diff options
author | wurstsalat <mailtrash@posteo.de> | 2023-06-11 13:39:01 +0300 |
---|---|---|
committer | wurstsalat <mailtrash@posteo.de> | 2023-06-11 13:39:01 +0300 |
commit | 77c9c8818f9ed19bb71172048e1d81f634a5a5e6 (patch) | |
tree | 0afa411791cea26b77c219dd7691434a29a7d099 /openpgp | |
parent | 298406cc223302b11f46f36700833526f5f33d4c (diff) |
cq: Use union operator
Diffstat (limited to 'openpgp')
-rw-r--r-- | openpgp/backend/gpgme.py | 4 | ||||
-rw-r--r-- | openpgp/backend/pygpg.py | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/openpgp/backend/gpgme.py b/openpgp/backend/gpgme.py index 54b8619..d485742 100644 --- a/openpgp/backend/gpgme.py +++ b/openpgp/backend/gpgme.py @@ -14,8 +14,6 @@ # You should have received a copy of the GNU General Public License # along with OpenPGP Gajim Plugin. If not, see <http://www.gnu.org/licenses/>. -from typing import Optional - import logging from nbxmpp.protocol import JID @@ -46,7 +44,7 @@ class KeyringItem: return False return jid == self.jid - def _get_uid(self) -> Optional[str]: + def _get_uid(self) -> str | None: for uid in self._key.uids: try: return parse_uid(uid.uid) diff --git a/openpgp/backend/pygpg.py b/openpgp/backend/pygpg.py index 009114f..aaf1fa9 100644 --- a/openpgp/backend/pygpg.py +++ b/openpgp/backend/pygpg.py @@ -14,8 +14,6 @@ # You should have received a copy of the GNU General Public License # along with OpenPGP Gajim Plugin. If not, see <http://www.gnu.org/licenses/>. -from typing import Optional - import logging import gnupg @@ -53,7 +51,7 @@ class KeyringItem: def keyid(self) -> str: return self._key['keyid'] - def _get_uid(self) -> Optional[str]: + def _get_uid(self) -> str | None: for uid in self._key['uids']: try: return parse_uid(uid) |