[pgp] Fix ruff errors
This commit is contained in:
@@ -73,7 +73,7 @@ class PGP(metaclass=Singleton):
|
||||
result = self._pgp.decrypt(data.encode("utf8"))
|
||||
return str(result)
|
||||
|
||||
@lru_cache(maxsize=8)
|
||||
@lru_cache(maxsize=8) # noqa: B019
|
||||
def sign(self, payload: str | None, key_id: str) -> str:
|
||||
if payload is None:
|
||||
payload = ""
|
||||
|
||||
@@ -158,7 +158,7 @@ class ChooseGPGKeyDialog(GajimAppWindow):
|
||||
model = cast(Gtk.ListStore, self._ui.keys_treeview.get_model())
|
||||
model.set_sort_func(1, self._sort)
|
||||
|
||||
for key_id in secret_keys.keys():
|
||||
for key_id in secret_keys:
|
||||
model.append((key_id, secret_keys[key_id]))
|
||||
|
||||
self.set_child(self._ui.box)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
from typing import Callable
|
||||
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import field
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ def find_gpg():
|
||||
gpg_cmd = binary + " -h >nul 2>&1"
|
||||
else:
|
||||
gpg_cmd = binary + " -h >/dev/null 2>&1"
|
||||
if subprocess.call(gpg_cmd, shell=True):
|
||||
if subprocess.call(gpg_cmd, shell=True): # noqa: S602
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user