I did some improvements regarding type checking. The main things include:
Added mypy to verify that the types are used correctly
Fixed issues mypy detected
Note: in the tests I checked the types with assert because mypy does not yet support analysing assertIsNotNone and similar functions (see python/mypy/issues/5088 and the linked issue python/mypy/issues/4063)
Explicitly re-export functions and types from the main package (see 94b572bb47d851d58bef1d3edb1cd7262ff9aae7)
Most importantly: added a py.typed marker to denote that this library has type hints (see PEP 561)
If you're not interested in some parts of this PR I can create a new one with only the parts you're interested in.
I did some improvements regarding type checking. The main things include:
assert
because mypy does not yet support analysing assertIsNotNone and similar functions (see python/mypy/issues/5088 and the linked issue python/mypy/issues/4063)py.typed
marker to denote that this library has type hints (see PEP 561)If you're not interested in some parts of this PR I can create a new one with only the parts you're interested in.