Skip to content

Commit

Permalink
silence linter warnings
Browse files Browse the repository at this point in the history
we want the code exactly how it is now
  • Loading branch information
totaam committed Apr 8, 2024
1 parent bc5a677 commit 7ca6f44
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/unittests/unit/net/digest_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

#pylint: disable=line-too-long
# pylint: disable=line-too-long

import unittest

from xpra.net.digest import (
get_digests, get_digest_module,
choose_digest, gendigest, verify_digest,
get_salt,
)
)


class TestDigest(unittest.TestCase):

Expand All @@ -28,6 +29,7 @@ def test_invalid_digest(self):
except TypeError:
pass

# noinspection PyTypeChecker
def test_all_digests(self):
for digest in get_digests():
if digest.startswith("hmac"):
Expand All @@ -37,6 +39,7 @@ def test_all_digests(self):
password = "secret"
d = gendigest(digest, password, salt)
assert d is not None

def nvd(password=password, salt=salt, response=d):
try:
r = verify_digest(digest, password, salt, response)
Expand All @@ -46,7 +49,7 @@ def nvd(password=password, salt=salt, response=d):
nvd(password=None)
nvd(salt=None)
nvd(response=None)
#truncated:
# truncated:
nvd(password=password[1:])
nvd(salt=salt[1:])
nvd(response=d[1:])
Expand All @@ -62,5 +65,6 @@ def test_choose_digest(self):
def main():
unittest.main()


if __name__ == '__main__':
main()
2 changes: 2 additions & 0 deletions xpra/gtk/dialogs/base_gui_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ def ib(self, title="", icon_name="browse.png", tooltip="", callback: Callable =
def add_widget(self, widget) -> None:
self.vbox.add(widget)

# noinspection PyMethodMayBeStatic
def focus_in(self, window, event) -> None:
log("focus_in(%s, %s)", window, event)

Expand All @@ -206,6 +207,7 @@ def quit(self, *args) -> None:
log("quit%s", args)
self.do_quit()

# noinspection PyMethodMayBeStatic
def do_quit(self) -> None:
log("do_quit()")
Gtk.main_quit()
Expand Down
1 change: 1 addition & 0 deletions xpra/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ def flush(self):
pass

def emit(self, record):
# noinspection PyBroadException
try:
msg = self.format(record)
stream = self.stream
Expand Down

0 comments on commit 7ca6f44

Please sign in to comment.