python-pyodata icon indicating copy to clipboard operation
python-pyodata copied to clipboard

Type annotations

Open mamiksik opened this issue 5 years ago • 1 comments

I suggest that all future code should be type annotated and I also suggest adding MyPy to CI. This will make the code easier to read for users as well as maintainers, prevent unnecessary errors and generally make code hinting much more accurate.

References: PEP 484 -- Type Hints => https://www.python.org/dev/peps/pep-0484/ MyPy => https://github.com/python/mypy

mamiksik avatar Nov 08 '19 12:11 mamiksik

Note: Current list of type checkers in Python to choose from is: Mypy, Pyre, Pyright.

As (perhaps practical, not exact) alternative to marking the code with type annotations, one can introduce also mutation testing on top of current unit tests.

phanak-sap avatar Aug 25 '21 21:08 phanak-sap