OCHA-DAP / hdx-python-api

Python API for interacting with the HDX Data Portal
http://data.humdata.org
MIT License
80 stars 16 forks source link

Python 2.7 compatibility #3

Closed tim6her closed 7 years ago

tim6her commented 7 years ago

The type hints are Python 2.7 compatible now. They were checked for errors using $ mypy -p hdx --ignore-missing-imports. If there were obvious choices I added a hint, for instance __init__ has return type None by definition. That's why mypy complains less in the reformatted version (see this Gist). However, I did not assign a static type to every variable since from my understanding the hints are mainly used for PyCharm's type checker.

Tests are running smoothly using Python 2.7.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.02%) to 95.618% when pulling 67cd5b0358208e2d8baadf701f85bf4a8a505c8a on tim6her:master into b5c8f21ea001fa0673f201d9033694555467d7a2 on OCHA-DAP:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.4%) to 95.267% when pulling 67cd5b0358208e2d8baadf701f85bf4a8a505c8a on tim6her:master into b5c8f21ea001fa0673f201d9033694555467d7a2 on OCHA-DAP:master.

mcarans commented 7 years ago

Great work!