Resolve Mypy erorrs in `v3` branch
Attempts to address https://github.com/zarr-developers/zarr-python/issues/1593
There are still two unsolved issues around the nonexistant Store.from_path in core.py.
TODO:
- [ ] Add unit tests and/or doctests in docstrings
- [ ] Add docstrings and API docs for any new/modified user-facing classes and functions
- [ ] New/modified features documented in docs/tutorial.rst
- [ ] Changes documented in docs/release.rst
- [ ] GitHub Actions have all passed
- [ ] Test coverage is 100% (Codecov passes)
Thanks, @DahnJ. I've launched the workflows.
Thanks @joshmoore I tried to fix a failing test (which I think happened because Any was used in a Pydantic model), can you launch them again please?
On their way! 🏇🏽
@jhamman I have addressed the comments in https://github.com/zarr-developers/zarr-python/pull/1692/commits/a30af88060b2db34717679e00c29cf2a03ddd265
I was not sure how to handle the second Store.from_path() reference. What should happen if the store_like argument is of type str? I tried to make a potential suggestion based on a commented-out code in https://github.com/zarr-developers/zarr-python/pull/1692/commits/f57527a2f142941ebce09b924bae0933f1885a5e. Let me please know if this is the correct way of handling that case.
As for getting mypy to pass, it does pass for me locally and I didn't add any type: ignore lines. However, there already are a few in zarr/v3 – I removed some more in https://github.com/zarr-developers/zarr-python/pull/1692/commits/e1fdd1ee231f134724f42b9072ea8e684407ec4b and then turned on mypy in pre-commit in https://github.com/zarr-developers/zarr-python/pull/1692/commits/db6da340ccafc0267d054a8002c3ee892483b724.
@DahnJ - I think this is a great step forward. I want @d-v-b to review this but from my perspective, it could go in now, even with the outstanding store issue.
This looks good! There's some overlap with stuff I did over in #1743, but that's not a problem. I will merge and rebase #1743 on this.
thanks @DahnJ !