mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +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,17 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import platform
|
||||
import shlex
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
import sys
|
||||
from typing import Callable, List
|
||||
|
||||
TOOLS_DIR = os.path.dirname(__file__)
|
||||
ROOT_DIR = os.path.dirname(TOOLS_DIR)
|
||||
sys.path.insert(0, ROOT_DIR)
|
||||
from scripts.lib.zulip_tools import get_dev_uuid_var_path
|
||||
|
||||
UUID_VAR_PATH = get_dev_uuid_var_path()
|
||||
|
||||
def run(check_func: Callable[[], bool]) -> None:
|
||||
@@ -88,7 +87,7 @@ def test_models() -> bool:
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = settings_module
|
||||
import django
|
||||
django.setup()
|
||||
from zerver.models import UserProfile, Realm
|
||||
from zerver.models import Realm, UserProfile
|
||||
print('Num realms: ', Realm.objects.count())
|
||||
print('Num users: ', UserProfile.objects.count())
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user