-
-
Notifications
You must be signed in to change notification settings - Fork 331
Update pre-commit hooks + mypy fixes #3133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@d-v-b any ideas what's going on with the typing error here? I can't wrap my head around why it's erroring. Perhaps we should just stick an # type: ignore comment on the failing line? |
I wonder whether this would fix the mypy error: - if dtype_category == "variable-length-string":
- zdtype = VariableLengthUTF8()
- else:
- zdtype = Int8()
+ if dtype_category == "variable-length-string":
+ zdtype = VariableLengthUTF8
+ else:
+ zdtype = Int8 |
The issue with the dtype mypy error was the variable length string type is not actually a valid |
which specific typing error? a basic challenge with |
This line here: https://github.com/zarr-developers/zarr-python/pull/3133/files#diff-da24b355349b53e4c8047034767d008e4c2ce9ea6c8933a3acd50d0828f00528R334 - if you remove the typing ignores, it gives an error. |
yeah, mypy is confused there, so the type ignore is correct. This will get simpler in a few months when we drop numpy < 2. |
Replaces #3109.