File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,38 @@ xy.py:1: error: Function is missing a type annotation
196
196
xy.py:2: error: Call to untyped function "f" in typed context
197
197
xx.py:1: error: Function is missing a type annotation
198
198
199
+ [case testInFileConfigSection]
200
+ # cmd: mypy x.py y.py z.py
201
+ [file mypy.ini]
202
+ [[mypy]
203
+ disallow_untyped_defs = True
204
+ [file x.py]
205
+ def f(a):
206
+ pass
207
+ def g(a: int) -> int:
208
+ return f(a)
209
+ [file y.py]
210
+ # [[mypy]
211
+ # disallow_untyped_defs = False
212
+ def f(a):
213
+ pass
214
+ def g(a: int) -> int:
215
+ return f(a)
216
+ [file z.py]
217
+ #
218
+ # [[mypy]
219
+ # disallow_untyped_calls = True
220
+ #
221
+
222
+ def f(a):
223
+ pass
224
+ def g(a: int) -> int:
225
+ return f(a)
226
+ [out]
227
+ z.py:6: error: Function is missing a type annotation
228
+ z.py:9: error: Call to untyped function "f" in typed context
229
+ x.py:1: error: Function is missing a type annotation
230
+
199
231
[case testMultipleGlobConfigSection]
200
232
# cmd: mypy x.py y.py z.py
201
233
[file mypy.ini]
You can’t perform that action at this time.
0 commit comments