File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 ArgKind ,
4545 CallExpr ,
4646 Context ,
47- Decorator ,
4847 Expression ,
4948 FuncDef ,
5049 IndexExpr ,
@@ -1150,14 +1149,6 @@ def no_variant_matches_arguments(
11501149
11511150 msg = f'Unexpected keyword argument "{ kwarg_name } "' + for_func
11521151
1153- if matching_variant is not None and matching_variant .definition is not None :
1154- defn = matching_variant .definition
1155- if isinstance (defn , Decorator ):
1156- func_line = defn .func .line
1157- else :
1158- func_line = defn .line
1159- msg += f" defined on line { func_line } "
1160-
11611152 if matches :
11621153 msg += f"; did you mean { pretty_seq (matches , 'or' )} ?"
11631154 self .fail (msg , context , code = code )
Original file line number Diff line number Diff line change @@ -2595,7 +2595,7 @@ def f(foobar: str) -> None: ...
25952595def f(foobar: Union[int, str]) -> None:
25962596 pass
25972597
2598- f(fobar=1) # E: Unexpected keyword argument "fobar" for overloaded function "f" defined on line 4 ; did you mean "foobar"?
2598+ f(fobar=1) # E: Unexpected keyword argument "fobar" for overloaded function "f"; did you mean "foobar"?
25992599f(random=[1,2,3]) # E: Unexpected keyword argument "random" for overloaded function "f" \
26002600 # N: Possible overload variants: \
26012601 # N: def f(foobar: int) -> None \
You can’t perform that action at this time.
0 commit comments