Skip to content

Commit

Permalink
Add type annotations to function definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbyrnepr2 committed Jul 16, 2023
1 parent 1b3355c commit ea5dd00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion astroid/brain/brain_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ def looks_like_typing_typevar_or_newtype(node) -> bool:
return False


def infer_typing_typevar_or_newtype(node, context_itton=None):
def infer_typing_typevar_or_newtype(
node: Call, context_itton: context.InferenceContext | None = None
) -> Iterator[ClassDef]:
"""Infer a typing.TypeVar(...) or typing.NewType(...) call."""
try:
func = next(node.func.infer(context=context_itton))
Expand Down

0 comments on commit ea5dd00

Please sign in to comment.