Skip to content

Commit

Permalink
[Minor bugfix]: typing_extensions.Any is a thing
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood committed Jan 8, 2023
1 parent cda8c32 commit d35610d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/typeshed_stats/gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def visit_Attribute(self, node: ast.Attribute) -> None:
value = node.value
if isinstance(value, ast.Name):
match f"{value.id}.{node.attr}":
case "typing.Any":
case "typing.Any" | "typing_extensions.Any":
self.analysis.Any_in_annotation = True
case "_typeshed.Incomplete":
self.analysis.Incomplete_in_annotation = True
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ async def metaclass_classmethod2(mcls) -> typing.Any: ...
class Bacon(dict[str, Any], list[Any], tuple[Any, ...]): ...
class Ham(dict[str, Incomplete], list[Incomplete], tuple[Incomplete, ...]): ...
class SpammySpam(dict[str, list[Incomplete]], list[list[Any]]): ...
class Peanuts(Any): ...
class SpammySpam(dict[str, list[_typeshed.Incomplete]], list[list[typing.Any]]): ...
class Peanuts(typing_extensions.Any): ...
class Cashews(Incomplete): ...
class Peas(Any, Incomplete): ...
"""
Expand Down

0 comments on commit d35610d

Please sign in to comment.