python: Mark intentionally unused imports with noop statements.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg 2019-02-22 15:48:42 -08:00 committed by Tim Abbott
parent 649235cfec
commit f1ec67c614
3 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,9 @@ def check_venv(filename):
import django
import ujson
import zulip
django
ujson
zulip
except ImportError:
print("You need to run %s inside a Zulip dev environment." % (filename,))
user_id = os.getuid()

View File

@ -22,6 +22,7 @@ class ZerverConfig(AppConfig):
# running that code too early in Django's setup process, but
# in any case, this is an intentionally unused import.
import zerver.signals
zerver.signals
if settings.POST_MIGRATION_CACHE_FLUSHING:
post_migrate.connect(flush_cache, sender=self)

View File

@ -28,6 +28,7 @@ django.setup() # We need to call setup to load applications.
# need to import zerver.models first before the middleware tries to import it.
import zerver.models
zerver.models
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION