-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Modernize type annotations Use more modern type annotations as described in [PEP 585](https://peps.python.org/pep-0585) and [PEP 604](https://peps.python.org/pep-0604/). The syntax proposed in these PEPs for Python 3.9 & 3.10 can be enabled in Python>=3.7 using ```python from __future__ import annotations ``` * Replace usage of (deprecated) `typing.Tuple` and `typing.List` with `tuple` and `list` * Replace usage of (deprecated) `typing.Iterable` and `typing.Iterator` with the corresponding classes from `collections.abc` * Use pipe (`|`) operator syntax to avoid usage of `typing.Optional` and `typing.Union` I also removed some awkward custom types (`IntOrInts` and `NDSlice`) and replaced their usage in the code with their literal definitions, which have been simplified by the above changes. * Revert usage of `tuple[...]` inside `typing.cast()`
- Loading branch information
Showing
11 changed files
with
105 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.