mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
python: Convert assignment type annotations to Python 3.6 style.
Commit split by tabbott; this has changes to scripts/, tools/, and puppet/. scripts/lib/hash_reqs.py, scripts/lib/setup_venv.py, scripts/lib/zulip_tools.py, and tools/lib/provision.py are excluded so tools/provision still gives the right error message on Ubuntu 16.04 with Python 3.5. Generated by com2ann, with whitespace fixes and various manual fixes for runtime issues: -shebang_rules: List[Rule] = [ +shebang_rules: List["Rule"] = [ -trailing_whitespace_rule: Rule = { +trailing_whitespace_rule: "Rule" = { -whitespace_rules: List[Rule] = [ +whitespace_rules: List["Rule"] = [ -comma_whitespace_rule: List[Rule] = [ +comma_whitespace_rule: List["Rule"] = [ -prose_style_rules: List[Rule] = [ +prose_style_rules: List["Rule"] = [ -html_rules: List[Rule] = whitespace_rules + prose_style_rules + [ +html_rules: List["Rule"] = whitespace_rules + prose_style_rules + [ - target_port: int = None + target_port: int Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
ad07814fa4
commit
f8339f019d
@@ -69,7 +69,7 @@ if not python_files and not pyi_files:
|
||||
print("There are no files to run mypy on.")
|
||||
sys.exit(0)
|
||||
|
||||
mypy_args = [] # type: List[str]
|
||||
mypy_args: List[str] = []
|
||||
if args.quiet:
|
||||
mypy_args += ["--no-error-summary"]
|
||||
mypy_args += ["--"] + python_files + pyi_files
|
||||
|
Reference in New Issue
Block a user