mirror of
https://github.com/zulip/zulip.git
synced 2025-10-30 03:23:50 +00:00
python: Sort imports with isort.
Fixes #2665. Regenerated by tabbott with `lint --fix` after a rebase and change in parameters. Note from tabbott: In a few cases, this converts technical debt in the form of unsorted imports into different technical debt in the form of our largest files having very long, ugly import sequences at the start. I expect this change will increase pressure for us to split those files, which isn't a bad thing. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
b666aef2d3
commit
365fe0b3d5
@@ -1,22 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
import glob
|
||||
import os
|
||||
import shutil
|
||||
|
||||
import sys
|
||||
from typing import List
|
||||
|
||||
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
sys.path.append(ZULIP_PATH)
|
||||
from scripts.lib.zulip_tools import run, OKBLUE, ENDC, \
|
||||
get_dev_uuid_var_path, is_digest_obsolete, write_new_digest
|
||||
|
||||
from version import PROVISION_VERSION
|
||||
from pygments import __version__ as pygments_version
|
||||
|
||||
from scripts.lib.zulip_tools import (
|
||||
ENDC,
|
||||
OKBLUE,
|
||||
get_dev_uuid_var_path,
|
||||
is_digest_obsolete,
|
||||
run,
|
||||
write_new_digest,
|
||||
)
|
||||
from tools.setup.generate_zulip_bots_static_files import generate_zulip_bots_static_files
|
||||
from version import PROVISION_VERSION
|
||||
|
||||
VENV_PATH = "/srv/zulip-py3-venv"
|
||||
UUID_VAR_PATH = get_dev_uuid_var_path()
|
||||
@@ -177,7 +181,7 @@ def clean_unused_caches() -> None:
|
||||
verbose=False,
|
||||
no_headings=True,
|
||||
)
|
||||
from scripts.lib import clean_venv_cache, clean_node_cache, clean_emoji_cache
|
||||
from scripts.lib import clean_emoji_cache, clean_node_cache, clean_venv_cache
|
||||
clean_venv_cache.main(args)
|
||||
clean_node_cache.main(args)
|
||||
clean_emoji_cache.main(args)
|
||||
@@ -227,12 +231,13 @@ def main(options: argparse.Namespace) -> int:
|
||||
import django
|
||||
django.setup()
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from zerver.lib.test_fixtures import (
|
||||
DEV_DATABASE,
|
||||
TEST_DATABASE,
|
||||
destroy_leaked_test_databases,
|
||||
)
|
||||
from django.conf import settings
|
||||
|
||||
if options.is_force or need_to_run_configure_rabbitmq(
|
||||
[settings.RABBITMQ_PASSWORD]):
|
||||
|
||||
Reference in New Issue
Block a user