Skip to content

Commit 7e311f1

Browse files
committed
fix: py310
1 parent e522e32 commit 7e311f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,8 @@ def get_dtype(dtype: object) -> Generator[type | str, None, None]:
679679
"""Extract types and string literals from a Union or Literal type."""
680680
if isinstance(dtype, str):
681681
yield dtype
682-
elif isinstance(dtype, type):
682+
elif isinstance(dtype, type) and not str(dtype).startswith("type["):
683+
# isinstance(type[bool], type) in py310, but not in newer versions
683684
yield dtype() if "pandas" in str(dtype) else dtype
684685
else:
685686
for arg in get_args(dtype):

0 commit comments

Comments
 (0)