zarr-python
zarr-python copied to clipboard
[v3] Path to 100% typing
I thought I'd open an issue to track the path to adding 100% typing to the v3 branch. The mypy docs have a good guide to gradually adding typing to existing code, and from there I think the best way to get to enabling the mypy strict option is work through the sub-options that make up the strict rule:
- [x] warn_unused_configs = True https://github.com/zarr-developers/zarr-python/pull/1781
- [x] warn_redundant_casts = True https://github.com/zarr-developers/zarr-python/pull/1781
- [x] warn_unused_ignores = True https://github.com/zarr-developers/zarr-python/pull/1781
- [x] strict_equality = True https://github.com/zarr-developers/zarr-python/pull/1793
- [x] strict_concatenate = True https://github.com/zarr-developers/zarr-python/pull/1793
- [x] check_untyped_defs = True https://github.com/zarr-developers/zarr-python/pull/1784, https://github.com/zarr-developers/zarr-python/pull/1790
- [ ] disallow_subclassing_any = True
- [x] disallow_untyped_decorators = True https://github.com/zarr-developers/zarr-python/pull/1793
- [x] disallow_any_generics = True https://github.com/zarr-developers/zarr-python/pull/1794
- [x] disallow_untyped_calls = True https://github.com/zarr-developers/zarr-python/pull/1811
- [x] disallow_incomplete_defs = True https://github.com/zarr-developers/zarr-python/pull/1814
- [x] disallow_untyped_defs = True https://github.com/zarr-developers/zarr-python/pull/1834
- [ ] no_implicit_reexport = True
- [ ] warn_return_any = True
From repo-review
- [ ] warn_unreachable = True
- [ ] enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
We can use the list above to track progress, and link pull requests that address each option in turn (from top to bottom).