Skip to content

Commit

Permalink
Fix CallableType.formal_arguments docstring (#11861)
Browse files Browse the repository at this point in the history
PR #11543 changed the `formal_arguments` method to return a list of formal arguments instead of yielding them. However the docstring was not updated at the time to reflect this.
  • Loading branch information
MarkCBell authored Jan 9, 2022
1 parent c0c86d0 commit 25b2129
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ def max_possible_positional_args(self) -> int:
return sum([kind.is_positional() for kind in self.arg_kinds])

def formal_arguments(self, include_star_args: bool = False) -> List[FormalArgument]:
"""Yields the formal arguments corresponding to this callable, ignoring *arg and **kwargs.
"""Return a list of the formal arguments of this callable, ignoring *arg and **kwargs.
To handle *args and **kwargs, use the 'callable.var_args' and 'callable.kw_args' fields,
if they are not None.
Expand Down

0 comments on commit 25b2129

Please sign in to comment.