File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -5396,14 +5396,27 @@ def f_d(arg: str) -> None: ...
5396
5396
@dec_d # E: "int" not callable
5397
5397
def f_d(arg): ...
5398
5398
5399
- Bad = TypeVar('Good') # type: ignore
5399
+ Bad1 = TypeVar('Good') # type: ignore
5400
5400
5401
- def dec_e(f: Bad ) -> Bad : ... # type: ignore
5401
+ def dec_e(f: Bad1 ) -> Bad1 : ... # type: ignore
5402
5402
5403
5403
@overload
5404
5404
def f_e(arg: int) -> None: ...
5405
5405
@overload
5406
5406
def f_e(arg: str) -> None: ...
5407
- @dec_e # E: Bad ? not callable
5407
+ @dec_e # E: Bad1 ? not callable
5408
5408
def f_e(arg): ...
5409
+
5410
+ class Bad2:
5411
+ def __getattr__(self, attr):
5412
+ if attr == "__call__":
5413
+ return lambda *a, **kw: print(a, kw)
5414
+ raise AttributeError
5415
+
5416
+ @overload
5417
+ def f_f(arg: int) -> None: ...
5418
+ @overload
5419
+ def f_f(arg: str) -> None: ...
5420
+ @Bad2() # E: "Bad2" not callable
5421
+ def f_f(arg): ...
5409
5422
[builtins fixtures/dict.pyi]
You can’t perform that action at this time.
0 commit comments