Skip to content

Commit 8d7da12

Browse files
committed
get ready for pyright strict
1 parent 1f0c033 commit 8d7da12

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas-stubs/_typing.pyi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,11 @@ RandomState: TypeAlias = (
209209
)
210210

211211
# dtypes
212-
NpDtypeNoStr: TypeAlias = np.dtype[np.generic] | type[complex | bool | object]
212+
if sys.version_info >= (3, 11):
213+
NpDtypeNoStr: TypeAlias = np.dtype | type[complex | bool | object]
214+
else:
215+
NpDtypeNoStr: TypeAlias = np.dtype[Any] | type[complex | bool | object]
216+
213217
NpDtype: TypeAlias = str | NpDtypeNoStr | type[str]
214218
Dtype: TypeAlias = ExtensionDtype | NpDtype
215219

0 commit comments

Comments
 (0)