@@ -7836,7 +7836,7 @@ def to_same_callable(fn: Callable[P, T]) -> Callable[P, T]:
78367836class A:
78377837 def undecorated() -> None: ... # E: Method must have at least one argument. Did you forget the "self" argument?
78387838
7839- def undecorated_not_self(x: int) -> None: ... # E: Self argument missing for a non-static method (or an invalid type for self)
7839+ def undecorated_not_self(x: int) -> None: ... # E: "self" parameter missing for a non-static method (or an invalid type for self)
78407840
78417841 def undecorated_not_self_2(self: int) -> None: ... # E: The erased type of self "builtins.int" is not a supertype of its class "__main__.A"
78427842
@@ -7864,7 +7864,7 @@ class A:
78647864 def g1() -> None: ... # E: Method must have at least one argument. Did you forget the "self" argument?
78657865
78667866 @to_same_callable
7867- def g2(x: int) -> None: ... # E: Self argument missing for a non-static method (or an invalid type for self)
7867+ def g2(x: int) -> None: ... # E: "self" parameter missing for a non-static method (or an invalid type for self)
78687868
78697869 @to_same_callable
78707870 def g3(self: int) -> None: ... # E: The erased type of self "builtins.int" is not a supertype of its class "__main__.A"
@@ -7909,7 +7909,7 @@ class A:
79097909 return 0
79107910
79117911 @to_same_callable
7912- def fn2(_x: int) -> int: # E: Self argument missing for a non-static method (or an invalid type for self)
7912+ def fn2(_x: int) -> int: # E: "self" parameter missing for a non-static method (or an invalid type for self)
79137913 return 0
79147914
79157915 @to_same_callable
@@ -7931,7 +7931,7 @@ class B:
79317931 return 0
79327932
79337933 @remove_first
7934- def fn3(self, _x: int) -> int: # E: Self argument missing for a non-static method (or an invalid type for self)
7934+ def fn3(self, _x: int) -> int: # E: "self" parameter missing for a non-static method (or an invalid type for self)
79357935 return 0
79367936
79377937 @remove_first
@@ -7965,15 +7965,15 @@ reveal_type(C().fn3) # N: Revealed type is "def (self: __main__.C, _x: builtins
79657965
79667966class D:
79677967 @add_wrong_first
7968- def fn1() -> int: # E: Self argument missing for a non-static method (or an invalid type for self)
7968+ def fn1() -> int: # E: "self" parameter missing for a non-static method (or an invalid type for self)
79697969 return 0
79707970
79717971 @add_wrong_first
7972- def fn2(_x: int) -> int: # E: Self argument missing for a non-static method (or an invalid type for self)
7972+ def fn2(_x: int) -> int: # E: "self" parameter missing for a non-static method (or an invalid type for self)
79737973 return 0
79747974
79757975 @add_wrong_first
7976- def fn3(self, _x: int) -> int: # E: Self argument missing for a non-static method (or an invalid type for self)
7976+ def fn3(self, _x: int) -> int: # E: "self" parameter missing for a non-static method (or an invalid type for self)
79777977 return 0
79787978
79797979reveal_type(D().fn1) # E: Invalid self argument "D" to attribute function "fn1" with type "Callable[[int], int]" \
@@ -7996,7 +7996,7 @@ def to_same_callable(fn: Callable[P, T]) -> Callable[P, T]:
79967996def unchecked():
79977997 class Bad:
79987998 def fn() -> None: ... # E: Method must have at least one argument. Did you forget the "self" argument?
7999- def fn2(x: int) -> None: ... # E: Self argument missing for a non-static method (or an invalid type for self)
7999+ def fn2(x: int) -> None: ... # E: "self" parameter missing for a non-static method (or an invalid type for self)
80008000
80018001 # TODO: would be nice to make this error, but now we see the func
80028002 # being decorated as Any, not as a callable
@@ -8017,12 +8017,12 @@ def unchecked():
80178017def checked() -> None:
80188018 class Bad:
80198019 def fn() -> None: ... # E: Method must have at least one argument. Did you forget the "self" argument?
8020- def fn2(x: int) -> None: ... # E: Self argument missing for a non-static method (or an invalid type for self)
8020+ def fn2(x: int) -> None: ... # E: "self" parameter missing for a non-static method (or an invalid type for self)
80218021
80228022 @to_same_callable
80238023 def g() -> None: ... # E: Method must have at least one argument. Did you forget the "self" argument?
80248024 @to_same_callable
8025- def g2(x: int) -> None: ... # E: Self argument missing for a non-static method (or an invalid type for self)
8025+ def g2(x: int) -> None: ... # E: "self" parameter missing for a non-static method (or an invalid type for self)
80268026
80278027 class AlsoBad:
80288028 def fn(): ... # E: Method must have at least one argument. Did you forget the "self" argument?
0 commit comments