From fe72f3b131632f21ece6dfe6dbc8c9b07cbd30e6 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 18 Apr 2020 15:49:45 -0700 Subject: [PATCH] =?UTF-8?q?typing:=20Remove=20=E2=80=98if=20False=E2=80=99?= =?UTF-8?q?=20guard=20for=20typing=20imports.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit typing is in the Python 3.5 standard library. Signed-off-by: Anders Kaseorg --- zulip/integrations/bridge_with_irc/irc-mirror.py | 4 +--- zulip/integrations/svn/post-commit | 4 +--- zulip/integrations/trac/zulip_trac.py | 3 +-- zulip/integrations/zephyr/check-mirroring | 3 +-- zulip/setup.py | 3 +-- zulip_bots/setup.py | 3 +-- zulip_botserver/setup.py | 3 +-- 7 files changed, 7 insertions(+), 16 deletions(-) diff --git a/zulip/integrations/bridge_with_irc/irc-mirror.py b/zulip/integrations/bridge_with_irc/irc-mirror.py index f03c1f2..266cd51 100755 --- a/zulip/integrations/bridge_with_irc/irc-mirror.py +++ b/zulip/integrations/bridge_with_irc/irc-mirror.py @@ -8,9 +8,7 @@ import argparse import zulip import sys import traceback - -if False: - from typing import Any, Dict +from typing import Any, Dict usage = """./irc-mirror.py --irc-server=IRC_SERVER --channel= --nick-prefix= --stream= [optional args] diff --git a/zulip/integrations/svn/post-commit b/zulip/integrations/svn/post-commit index 23cebe0..a97b12d 100755 --- a/zulip/integrations/svn/post-commit +++ b/zulip/integrations/svn/post-commit @@ -13,9 +13,7 @@ import os import sys import os.path import pysvn - -if False: - from typing import Any, Dict, List, Optional, Text, Tuple, Union +from typing import Any, Dict, List, Optional, Text, Tuple, Union sys.path.insert(0, os.path.dirname(__file__)) import zulip_svn_config as config diff --git a/zulip/integrations/trac/zulip_trac.py b/zulip/integrations/trac/zulip_trac.py index 0e2a9cd..9d2d4cc 100644 --- a/zulip/integrations/trac/zulip_trac.py +++ b/zulip/integrations/trac/zulip_trac.py @@ -19,8 +19,7 @@ sys.path.insert(0, os.path.dirname(__file__)) import zulip_trac_config as config VERSION = "0.9" -if False: - from typing import Any, Dict +from typing import Any, Dict if config.ZULIP_API_PATH is not None: sys.path.append(config.ZULIP_API_PATH) diff --git a/zulip/integrations/zephyr/check-mirroring b/zulip/integrations/zephyr/check-mirroring index ced6720..a1d3449 100755 --- a/zulip/integrations/zephyr/check-mirroring +++ b/zulip/integrations/zephyr/check-mirroring @@ -10,8 +10,7 @@ import hashlib import zephyr import zulip -if False: - from typing import Any, Dict, List, Set, Tuple +from typing import Any, Dict, List, Set, Tuple parser = optparse.OptionParser() parser.add_option('--verbose', diff --git a/zulip/setup.py b/zulip/setup.py index 7d7e2e6..4ebde55 100755 --- a/zulip/setup.py +++ b/zulip/setup.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 -if False: - from typing import Any, Dict, Generator, List, Tuple +from typing import Any, Dict, Generator, List, Tuple import os import sys diff --git a/zulip_bots/setup.py b/zulip_bots/setup.py index a5e0742..b170ca3 100755 --- a/zulip_bots/setup.py +++ b/zulip_bots/setup.py @@ -4,8 +4,7 @@ import os import sys import glob import subprocess -if False: - from typing import Any, Dict, Optional +from typing import Any, Dict, Optional ZULIP_BOTS_VERSION = "0.6.4" IS_PYPA_PACKAGE = False diff --git a/zulip_botserver/setup.py b/zulip_botserver/setup.py index 3f13587..c4a2628 100755 --- a/zulip_botserver/setup.py +++ b/zulip_botserver/setup.py @@ -1,8 +1,7 @@ #!/usr/bin/env python3 import sys -if False: - from typing import Any, Dict, Optional +from typing import Any, Dict, Optional ZULIP_BOTSERVER_VERSION = "0.6.4"