spoqa / sqlalchemy-utc

SQLAlchemy type to store aware datetime values
https://pypi.python.org/pypi/SQLAlchemy-Utc
MIT License
101 stars 20 forks source link

Make package is PEP-561 compatible #10

Closed b0g3r closed 3 years ago

b0g3r commented 3 years ago

PEP-561 describes which typing information might contain package and how to deal with it. Because sqlalchemy-utc doesn't distributed with py.typed file — mypy and other typing checkers cannot "safely" read it.

In few cases it can lead to problems, in my case sqlalchemy-stubs2 cannot infer type from field with UtcDateTime and raise errors like unexpected field in instance init.

This PR adds py.typed to package, so mypy can read from it and do all magic around it.

pbzweihander commented 3 years ago

Thanks for the PR!