From 0f27c472990892487621d59709ef904baaa60c62 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Fri, 17 May 2024 16:37:14 -0700 Subject: [PATCH] continuing to fix stub generation for 3.9 --- src/numpydantic/meta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/numpydantic/meta.py b/src/numpydantic/meta.py index 8c5a595..77a7e8d 100644 --- a/src/numpydantic/meta.py +++ b/src/numpydantic/meta.py @@ -24,7 +24,7 @@ def generate_ndarray_stub() -> str: # Create import statements, saving aliased name of type if needed if arr.__module__.startswith("numpydantic") or arr.__module__ == "typing": type_name = str(arr) if arr.__module__ == "typing" else arr.__name__ - import_strings.append(f"from {arr.__module__} import {arr.__name__}") + import_strings.append(f"from {arr.__module__} import {type_name}") else: # since other packages could use the same name for an imported object # (eg dask and zarr both use an Array class)