Skip to content

Commit 153fce8

Browse files
committed
fix: py310
1 parent e163ab4 commit 153fce8

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
@@ -681,7 +681,8 @@ def get_dtype(dtype: object) -> Generator[type | str, None, None]:
681681
"""Extract types and string literals from a Union or Literal type."""
682682
if isinstance(dtype, str):
683683
yield dtype
684-
elif isinstance(dtype, type):
684+
elif isinstance(dtype, type) and not str(dtype).startswith("type["):
685+
# isinstance(type[bool], type) in py310, but not in newer versions
685686
yield dtype() if "pandas" in str(dtype) else dtype
686687
else:
687688
for arg in get_args(dtype):

0 commit comments

Comments
 (0)