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:
Anders Kaseorg
2020-04-21 16:09:50 -07:00
committed by Tim Abbott
parent ad07814fa4
commit f8339f019d
26 changed files with 89 additions and 88 deletions

View File

@@ -57,7 +57,7 @@ def check_issue_labels() -> None:
"your api token. If you want to continue without using a token use --force.")
sys.exit(1)
next_page_url = 'https://api.github.com/repos/zulip/zulip/issues' # type: Optional[str]
next_page_url: Optional[str] = 'https://api.github.com/repos/zulip/zulip/issues'
unlabeled_issue_urls = []
while next_page_url:
try: