From 2d80b11a2025a782ab3cdfd7d6bb4f63f4a40980 Mon Sep 17 00:00:00 2001 From: un-pogaz <46523284+un-pogaz@users.noreply.github.com> Date: Fri, 10 Oct 2025 08:24:39 +0200 Subject: [PATCH] Pylint warning (manual) --- src/calibre/db/cli/cmd_list_categories.py | 2 +- src/calibre/srv/standalone.py | 2 +- src/calibre/srv/tests/auth.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/db/cli/cmd_list_categories.py b/src/calibre/db/cli/cmd_list_categories.py index f096b922ab..716aedc59b 100644 --- a/src/calibre/db/cli/cmd_list_categories.py +++ b/src/calibre/db/cli/cmd_list_categories.py @@ -77,7 +77,7 @@ def do_list(fields, data, opts): widths = [0 for x in fields] for i in data: for j, field in enumerate(fields): - widths[j] = max(widths[j], max(len(field), len(str(i[field])))) + widths[j] = max(widths[j], len(field), len(str(i[field]))) screen_width = geometry()[0] if not screen_width: diff --git a/src/calibre/srv/standalone.py b/src/calibre/srv/standalone.py index 959c4dc30f..d642d2c342 100644 --- a/src/calibre/srv/standalone.py +++ b/src/calibre/srv/standalone.py @@ -220,7 +220,7 @@ def main(args=sys.argv): raise SystemExit(_('No database found at CALIBRE_OVERRIDE_DATABASE_PATH: {}').format( os.environ['CALIBRE_OVERRIDE_DATABASE_PATH'])) - opts.auto_reload_port = int(os.environ.get('CALIBRE_AUTORELOAD_PORT', 0)) + opts.auto_reload_port = int(os.environ.get('CALIBRE_AUTORELOAD_PORT', 0)) # noqa: PLW1508 opts.allow_console_print = 'CALIBRE_ALLOW_CONSOLE_PRINT' in os.environ if opts.log and os.path.isdir(opts.log): raise SystemExit('The --log option must point to a file, not a directory') diff --git a/src/calibre/srv/tests/auth.py b/src/calibre/srv/tests/auth.py index 3a7bed75b7..b025486a1b 100644 --- a/src/calibre/srv/tests/auth.py +++ b/src/calibre/srv/tests/auth.py @@ -300,7 +300,7 @@ class TestAuth(BaseTest): # Test that a replay attack against a different URL does not work try: build_opener(cookie_handler).open(url+'2') - assert ('Replay attack succeeded') + assert True, 'Replay attack succeeded' except HTTPError as e: self.ae(e.code, http_client.UNAUTHORIZED)