Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type hints #33

Merged
merged 1 commit into from
Apr 3, 2021
Merged

Add type hints #33

merged 1 commit into from
Apr 3, 2021

Conversation

KapJI
Copy link
Contributor

@KapJI KapJI commented Apr 3, 2021

  • Setup mypy.
  • Enable strict checks.
  • I used modern PEP 585 type hints, like dict[str, str]. Old ones like Dict will be deprecated in Python 3.9 and removed completely in 2025. In Python 3.8 this requires from __future__ import annotations, this will be enabled by default in Python 3.10. One of the advantages is that these new types don't need to be imported.
  • Unfortunately, urllib3 doesn't export typing information yet, this is tracked by Start shipping our own type stubs urllib3/urllib3#1897. I'll try to update gpsoauth when it's ready.
  • Include py.typed marker to export all typing information.
  • Add Typing :: Typed classifier.
  • Explicitly add urllib3 to dependencies list.
  • Use standard importlib.metadata from Python 3.8.
  • Bump version to 0.5.0.

Closes #26

@simon-weber simon-weber merged commit 0f8d96e into simon-weber:master Apr 3, 2021
@simon-weber
Copy link
Owner

looks good; thanks!

@KapJI KapJI deleted the mypy branch April 3, 2021 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modernize codebase
2 participants