diff --git a/src/typeshed_stats/gather.py b/src/typeshed_stats/gather.py index 13d6f159..a11a7088 100644 --- a/src/typeshed_stats/gather.py +++ b/src/typeshed_stats/gather.py @@ -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 diff --git a/tests/conftest.py b/tests/conftest.py index afee326e..63847284 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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): ... """