File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ sys.path.append(os.path.dirname(TOOLS_DIR))
21
21
exclude = """
22
22
zulip/integrations/perforce/git_p4.py
23
23
zulip_bots/zulip_bots/bots
24
- zulip_botserver/setup.py
25
24
""" .split ()
26
25
27
26
parser = argparse .ArgumentParser (description = "Run mypy on files tracked by git." )
Original file line number Diff line number Diff line change 5
5
6
6
import os
7
7
import sys
8
+ if False :
9
+ from typing import Any , Dict , Optional
8
10
9
11
ZULIP_BOTSERVER_VERSION = "0.3.7"
10
12
51
53
52
54
# Manual dependency check
53
55
def check_dependency_manually (module_name , version = None ):
56
+ # type: (str, Optional[str]) -> None
54
57
try :
55
- module = import_module (module_name )
58
+ module = import_module (module_name ) # type: Any
56
59
if version is not None :
57
60
assert (LooseVersion (module .__version__ ) >= LooseVersion (version ))
58
61
except (ImportError , AssertionError ):
59
62
if version is not None :
60
63
print ("{name}>={version} is not installed." .format (
61
- req = req , version = version ), file = sys .stderr )
64
+ name = module_name , version = version ), file = sys .stderr )
62
65
else :
63
66
print ("{name} is not installed." .format (name = module_name ), file = sys .stderr )
64
67
sys .exit (1 )
You can’t perform that action at this time.
0 commit comments