From 107702bcbde7238ec787e9b427b8c8d40e01480b Mon Sep 17 00:00:00 2001 From: Felipe Batista da Silva Date: Fri, 23 Aug 2024 15:57:17 +0200 Subject: [PATCH] fix: mypy checking with django plugin is broken --- src/django_components/types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/django_components/types.py b/src/django_components/types.py index c93cff90..37394687 100644 --- a/src/django_components/types.py +++ b/src/django_components/types.py @@ -14,12 +14,12 @@ except ImportError: def __repr__(self) -> str: return f"Annotated[{self.type_}, {self.metadata[0]!r}, {self.metadata[1]!r}]" - def __getitem__(self, params: Any) -> "Annotated": # type: ignore + def __getitem__(self, params: Any) -> "Annotated[Any, Any, Any]": # type: ignore if not isinstance(params, tuple): params = (params,) return Annotated(self.type_, *params, **self.metadata[1]) # type: ignore - def __class_getitem__(self, *params: Any) -> "Annotated": # type: ignore + def __class_getitem__(self, *params: Any) -> "Annotated[Any, Any, Any]": # type: ignore return Annotated(*params) # type: ignore