def has_keystore_encryption(self) -> bool:
        """Returns whether encryption is enabled for the keystore.

        If True, e.g. signing a transaction will require a password.
        """
        if self.can_have_keystore_encryption():
            return bool(self.db.get('use_encryption', False))
        return False
Returns whether encryption is enabled for the keystore.

        If True, e.g. signing a transaction will require a password.
        
electrum/wallet.py