From ff409342e15624dd6f44c40fcc21a238396ed81e Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 31 Jul 2023 12:59:55 -0700 Subject: [PATCH] runtornado: Fix COM818 Trailing comma on bare tuple prohibited. Signed-off-by: Anders Kaseorg --- pyproject.toml | 2 ++ zerver/management/commands/runtornado.py | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 95f7be1c22..f279365faa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -96,6 +96,7 @@ select = [ "ANN", # annotations "B", # bugbear "C4", # comprehensions + "COM", # trailing comma "DJ", # Django "DTZ", # naive datetime "E", # style errors @@ -129,6 +130,7 @@ ignore = [ "B023", # Function definition does not bind loop variable "B904", # Within an except clause, raise exceptions with raise ... from err or raise ... from None to distinguish them from errors in exception handling "C408", # Unnecessary `dict` call (rewrite as a literal) + "COM812", # Trailing comma missing "DJ001", # Avoid using `null=True` on string-based fields "DJ008", # Model does not define `__str__` method "E402", # Module level import not at top of file diff --git a/zerver/management/commands/runtornado.py b/zerver/management/commands/runtornado.py index e74ea0d969..51457414e8 100644 --- a/zerver/management/commands/runtornado.py +++ b/zerver/management/commands/runtornado.py @@ -79,12 +79,12 @@ class Command(BaseCommand): stop_fut.set_result(None) def add_signal_handlers() -> None: - loop.add_signal_handler(signal.SIGINT, stop), - loop.add_signal_handler(signal.SIGTERM, stop), + loop.add_signal_handler(signal.SIGINT, stop) + loop.add_signal_handler(signal.SIGTERM, stop) def remove_signal_handlers() -> None: - loop.remove_signal_handler(signal.SIGINT), - loop.remove_signal_handler(signal.SIGTERM), + loop.remove_signal_handler(signal.SIGINT) + loop.remove_signal_handler(signal.SIGTERM) async with AsyncExitStack() as stack: stack.push_async_callback(