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

Add some type hints

Open wannaphong opened this issue 4 years ago • 3 comments

Add some type hints for python

wannaphong avatar Oct 01 '20 12:10 wannaphong

This project still supports Python 2

Gallaecio avatar Oct 01 '20 18:10 Gallaecio

This project still supports Python 2

OK.I changed type hints to type checking. https://stackoverflow.com/a/35230792

wannaphong avatar Oct 02 '20 06:10 wannaphong

Nice! I did not know about that syntax possible, and it looks like mypy supports it as well.

Do you think you could also add a Travis CI job that runs mypy to check annotations, excluding all files for now except the ones you’ve updated?

You would need to modify tox.ini and .travis.yml in the root folder. If you look for typing in the corresponding files of https://github.com/scrapy/scrapy , you’ll see how it can be done.

Gallaecio avatar Oct 02 '20 14:10 Gallaecio