Skip to content

Commit

Permalink
add types to the ndarray type collection key
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakers-the-rat committed Dec 14, 2024
1 parent 8bf2203 commit a02d9b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/numpydantic/vendor/nptyping/base_meta_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class SubscriptableMeta(ABCMeta):
new type is returned for every unique set of arguments.
"""

_all_types: Dict[Tuple[type, Tuple[Any, ...]], type] = {}
_all_types: Dict[Tuple[type, Tuple[Any, ...], tuple[type, ...]], type] = {}
_parameterized: bool = False

@abstractmethod
Expand Down Expand Up @@ -160,7 +160,7 @@ def __getitem__(cls, item: Any) -> type:
def _create_type(
cls, args: Tuple[Any, ...], additional_values: Dict[str, Any]
) -> type:
key = (cls, args)
key = (cls, args, tuple(type(a) for a in args))
if key not in cls._all_types:
cls._all_types[key] = type(
cls.__name__,
Expand Down

0 comments on commit a02d9b2

Please sign in to comment.