Skip to content

Commit c715003

Browse files
committed
fix: py310
1 parent 103433d commit c715003

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
@@ -249,7 +249,8 @@ def get_dtype(dtype: object) -> Generator[type | str, None, None]:
249249
"""Extract types and string literals from a Union or Literal type."""
250250
if isinstance(dtype, str):
251251
yield dtype
252-
elif isinstance(dtype, type):
252+
elif isinstance(dtype, type) and not str(dtype).startswith("type["):
253+
# isinstance(type[bool], type) in py310, but not in newer versions
253254
yield dtype() if "pandas" in str(dtype) else dtype
254255
else:
255256
for arg in get_args(dtype):

0 commit comments

Comments
 (0)