Skip to content

Commit ee74149

Browse files
use ImportWarning when ndarray.pyi stubfile can't be generated
1 parent 62f307f commit ee74149

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/numpydantic/meta.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,8 @@ def update_ndarray_stub() -> None:
6363
with open(pyi_file, "w") as pyi:
6464
pyi.write(stub_string)
6565
except Exception as e: # pragma: no cover
66-
warn(f"ndarray.pyi stub file could not be generated: {e}", stacklevel=1)
66+
warn(
67+
f"ndarray.pyi stub file could not be generated: {e}",
68+
category=ImportWarning,
69+
stacklevel=1,
70+
)

0 commit comments

Comments
 (0)