Skip to content

Commit c215b90

Browse files
committed
fix: py310
1 parent 04de9b1 commit c215b90

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
@@ -686,7 +686,8 @@ def get_dtype(dtype: object) -> Generator[type | str, None, None]:
686686
"""Extract types and string literals from a Union or Literal type."""
687687
if isinstance(dtype, str):
688688
yield dtype
689-
elif isinstance(dtype, type):
689+
elif isinstance(dtype, type) and not str(dtype).startswith("type["):
690+
# isinstance(type[bool], type) in py310, but not in newer versions
690691
yield dtype() if "pandas" in str(dtype) else dtype
691692
else:
692693
for arg in get_args(dtype):

0 commit comments

Comments
 (0)