@@ -112,37 +112,6 @@ parser.add_argument(
112
112
help = """run mypy on all python files, ignoring the exclude list.
113
113
This is useful if you have to find out which files fail mypy check.""" ,
114
114
)
115
- parser .add_argument (
116
- "--no-disallow-untyped-defs" ,
117
- dest = "disallow_untyped_defs" ,
118
- action = "store_false" ,
119
- default = True ,
120
- help = """Don't throw errors when functions are not annotated""" ,
121
- )
122
- parser .add_argument (
123
- "--scripts-only" ,
124
- dest = "scripts_only" ,
125
- action = "store_true" ,
126
- default = False ,
127
- help = """Only type check extensionless python scripts""" ,
128
- )
129
- parser .add_argument (
130
- "--warn-unused-ignores" ,
131
- dest = "warn_unused_ignores" ,
132
- action = "store_true" ,
133
- default = False ,
134
- help = """Use the --warn-unused-ignores flag with mypy""" ,
135
- )
136
- parser .add_argument (
137
- "--no-ignore-missing-imports" ,
138
- dest = "ignore_missing_imports" ,
139
- action = "store_false" ,
140
- default = True ,
141
- help = """Don't use the --ignore-missing-imports flag with mypy""" ,
142
- )
143
- parser .add_argument (
144
- "--quick" , action = "store_true" , default = False , help = """Use the --quick flag with mypy"""
145
- )
146
115
args = parser .parse_args ()
147
116
148
117
if args .all :
@@ -156,7 +125,6 @@ files_dict = lister.list_files(
156
125
modified_only = args .modified ,
157
126
exclude = exclude + ["stubs" ],
158
127
group_by_ftype = True ,
159
- extless_only = args .scripts_only ,
160
128
)
161
129
162
130
for inpath in force_include :
@@ -181,22 +149,12 @@ for file_path in python_files:
181
149
182
150
mypy_command = "mypy"
183
151
184
- extra_args = ["--follow-imports=silent" ]
185
- if args .disallow_untyped_defs :
186
- extra_args .append ("--disallow-untyped-defs" )
187
- if args .warn_unused_ignores :
188
- extra_args .append ("--warn-unused-ignores" )
189
- if args .ignore_missing_imports :
190
- extra_args .append ("--ignore-missing-imports" )
191
- if args .quick :
192
- extra_args .append ("--quick" )
193
-
194
152
# run mypy
195
153
status = 0
196
154
for repo , python_files in repo_python_files .items ():
197
155
print (f"Running mypy for `{ repo } `." , flush = True )
198
156
if python_files :
199
- result = subprocess .call ([mypy_command ] + extra_args + python_files )
157
+ result = subprocess .call ([mypy_command , "--" ] + python_files )
200
158
if result != 0 :
201
159
status = result
202
160
else :
0 commit comments