Skip to content

Commit 1657ddf

Browse files
committed
fix: py310
1 parent dce6045 commit 1657ddf

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
@@ -690,7 +690,8 @@ def get_dtype(dtype: object) -> Generator[type | str, None, None]:
690690
"""Extract types and string literals from a Union or Literal type."""
691691
if isinstance(dtype, str):
692692
yield dtype
693-
elif isinstance(dtype, type):
693+
elif isinstance(dtype, type) and not str(dtype).startswith("type["):
694+
# isinstance(type[bool], type) in py310, but not in newer versions
694695
yield dtype() if "pandas" in str(dtype) else dtype
695696
else:
696697
for arg in get_args(dtype):

0 commit comments

Comments
 (0)