From 9d2d6c8eb748301701835d899b5e21ea8693e113 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 28 Oct 2022 21:24:55 -0400 Subject: [PATCH] ruff: Fix M001 Unused `noqa` directive. Signed-off-by: Anders Kaseorg --- scripts/lib/pythonrc.py | 4 ++-- zproject/configured_settings.py | 8 ++++---- zproject/settings.py | 4 ++-- zproject/test_settings.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/lib/pythonrc.py b/scripts/lib/pythonrc.py index 43d7950000..164919bd42 100644 --- a/scripts/lib/pythonrc.py +++ b/scripts/lib/pythonrc.py @@ -1,8 +1,8 @@ try: from django.conf import settings # noqa: F401 - from analytics.models import * # noqa: F401, F403 - from zerver.models import * # noqa: F401, F403 + from analytics.models import * # noqa: F403 + from zerver.models import * # noqa: F403 except Exception: import traceback diff --git a/zproject/configured_settings.py b/zproject/configured_settings.py index fc4f128e83..aab10b9c15 100644 --- a/zproject/configured_settings.py +++ b/zproject/configured_settings.py @@ -5,19 +5,19 @@ # For any settings that are not set in the site-specific configuration file # (/etc/zulip/settings.py in production, or dev_settings.py or test_settings.py # in dev and test), we want to initialize them to sane defaults. -from .default_settings import * # noqa: F401,F403 isort: skip +from .default_settings import * # noqa: F403 isort: skip # Import variables like secrets from the prod_settings file # Import prod_settings after determining the deployment/machine type from .config import PRODUCTION if PRODUCTION: - from .prod_settings import * # noqa: F401,F403 isort: skip + from .prod_settings import * # noqa: F403 isort: skip else: # For the Dev VM environment, we use the same settings as the # sample prod_settings.py file, with a few exceptions. - from .prod_settings_template import * # noqa: F401,F403 isort: skip - from .dev_settings import * # noqa: F401,F403 isort: skip + from .prod_settings_template import * # noqa: F403 isort: skip + from .dev_settings import * # noqa: F403 isort: skip # Do not add any code after these wildcard imports! Add it to # computed_settings instead. diff --git a/zproject/settings.py b/zproject/settings.py index 890a08e93a..42d9d79797 100644 --- a/zproject/settings.py +++ b/zproject/settings.py @@ -23,8 +23,8 @@ import django_stubs_ext # django.db.models.Lookup[int] work correctly at runtime. django_stubs_ext.monkeypatch() -from .configured_settings import * # noqa: F401,F403 isort: skip -from .computed_settings import * # noqa: F401,F403 isort: skip +from .configured_settings import * # noqa: F403 isort: skip +from .computed_settings import * # noqa: F403 isort: skip # Do not add any code after these wildcard imports! Add it to # computed_settings instead. diff --git a/zproject/test_settings.py b/zproject/test_settings.py index a9b3d7a934..f8751e3330 100644 --- a/zproject/test_settings.py +++ b/zproject/test_settings.py @@ -17,8 +17,8 @@ import os # Ick. os.environ["EXTERNAL_HOST"] = os.getenv("TEST_EXTERNAL_HOST", "testserver") -from .settings import * # noqa: F401,F403 isort: skip -from .test_extra_settings import * # noqa: F401,F403 isort: skip +from .settings import * # noqa: F403 isort: skip +from .test_extra_settings import * # noqa: F403 isort: skip # Do not add any code after these wildcard imports! Add it to # test_extra_settings instead.