File tree 1 file changed +19
-9
lines changed 1 file changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -2351,21 +2351,31 @@ def bar() -> None:
2351
2351
[case testUnusedTargetNotImport]
2352
2352
import d, c, b, a
2353
2353
[file _.py]
2354
+ def f(): pass
2354
2355
[file m.py]
2355
2356
def f(): pass
2356
- def _(): pass
2357
+ _ = f
2358
+ _ = 0 # E: Incompatible types in assignment (expression has type "int", variable has type "Callable[[], Any]")
2357
2359
[file a.py]
2358
- import _
2359
- _ = 0 # E: Incompatible types in assignment (expression has type "int", variable has type Module)
2360
+ def foo() -> None:
2361
+ import _
2362
+ _.f()
2363
+ _ = 0 # E: Incompatible types in assignment (expression has type "int", variable has type Module)
2360
2364
[file b.py]
2361
- import m as _
2362
- _ = 0 # E: Incompatible types in assignment (expression has type "int", variable has type Module)
2365
+ def foo() -> None:
2366
+ import m as _
2367
+ _.f()
2368
+ _ = 0 # E: Incompatible types in assignment (expression has type "int", variable has type Module)
2363
2369
[file c.py]
2364
- from m import _
2365
- _ = 0 # E: Incompatible types in assignment (expression has type "int", variable has type "Callable[[], Any]")
2370
+ def foo() -> None:
2371
+ from m import _
2372
+ _()
2373
+ _ = 0 # E: Incompatible types in assignment (expression has type "int", variable has type "Callable[[], Any]")
2366
2374
[file d.py]
2367
- from m import f as _
2368
- _ = 0 # E: Incompatible types in assignment (expression has type "int", variable has type "Callable[[], Any]")
2375
+ def foo() -> None:
2376
+ from m import f as _
2377
+ _()
2378
+ _ = 0 # E: Incompatible types in assignment (expression has type "int", variable has type "Callable[[], Any]")
2369
2379
[builtins fixtures/module.pyi]
2370
2380
2371
2381
[case testUnusedTargetNotClass]
You can’t perform that action at this time.
0 commit comments