diff --git a/pybind11_stubgen/__init__.py b/pybind11_stubgen/__init__.py index 6cfeb557..6139f09a 100644 --- a/pybind11_stubgen/__init__.py +++ b/pybind11_stubgen/__init__.py @@ -265,7 +265,7 @@ class StubsGenerator(object): r"numpy.ndarray\[(?P[^\[\]]+)(\[(?P[^\[\]]+)\])?(?P[^][]*)\]" ): replace_numpy_array, re.compile( - r"(?Callable|Dict|[Ii]terator|[Ii]terable|List" + r"(?Annotated|Callable|Dict|[Ii]terator|[Ii]terable|List" r"|Optional|Set|Tuple|Union|ItemsView|KeysView|ValuesView)(?!\w)" ): replace_typing_types, }