mattlisiv / newsapi-python

A Python Client for News API
MIT License
376 stars 130 forks source link

Fix type hints and use typing module #35

Closed elutow closed 4 years ago

elutow commented 5 years ago

The type hints introduced in #34 have invalid syntax. This PR fixes that, and uses the typing module to make things a little more Pythonic.

bsolomon1124 commented 4 years ago

Hi @elutow: thanks for the PR, everything here looks good.

However, https://github.com/mattlisiv/newsapi-python/pull/38 had to revert the use of type hints because the project still officially supports Python 2.

So, I'm all for adding in type-hinting, but we would need to use # type: ... syntax to keep Python 2 compat.

Going to close this for now, but gladly re-open if, down the road, the project (in a planned/pre-announced way) drops Python 2 support.