python: Add noqa comments for the specific star imports we allow.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-06-10 17:53:32 -07:00 committed by Tim Abbott
parent 491fb3c3cf
commit 0e5946ee5a
4 changed files with 12 additions and 12 deletions

View File

@ -1,8 +1,8 @@
try:
from django.conf import settings
from zerver.models import *
from zerver.lib.actions import *
from analytics.models import *
from django.conf import settings # noqa: F401
from zerver.models import * # noqa: F401, F403
from zerver.lib.actions import * # noqa: F401, F403
from analytics.models import * # noqa: F401, F403
except Exception:
import traceback
print("\nException importing Zulip core modules on startup!")

View File

@ -5,18 +5,18 @@
# 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 * # isort: skip
from .default_settings import * # noqa: F401,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 * # isort: skip
from .prod_settings import * # noqa: F401,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 * # isort: skip
from .dev_settings import * # isort: skip
from .prod_settings_template import * # noqa: F401,F403 isort: skip
from .dev_settings import * # noqa: F401,F403 isort: skip
# Do not add any code after these wildcard imports! Add it to
# computed_settings instead.

View File

@ -16,8 +16,8 @@
#
########################################################################
from .configured_settings import * # isort: skip
from .computed_settings import * # isort: skip
from .configured_settings import * # noqa: F401,F403 isort: skip
from .computed_settings import * # noqa: F401,F403 isort: skip
# Do not add any code after these wildcard imports! Add it to
# computed_settings instead.

View File

@ -17,8 +17,8 @@ import os
if os.getenv("EXTERNAL_HOST") is None:
os.environ["EXTERNAL_HOST"] = "testserver"
from .settings import * # isort: skip
from .test_extra_settings import * # isort: skip
from .settings import * # noqa: F401,F403 isort: skip
from .test_extra_settings import * # noqa: F401,F403 isort: skip
# Do not add any code after these wildcard imports! Add it to
# test_extra_settings instead.