pendulum icon indicating copy to clipboard operation
pendulum copied to clipboard

python type annotations for PEP-561 compliance

Open johnjiang opened this issue 5 years ago • 1 comments

As python has gotten better and better support for type annotations we should add support for type annotations inside pendulum.

Thankfully there's already a PR open for this:

https://github.com/sdispater/pendulum/pull/320

Happy to help out in any way possible to get this through the finish line.

johnjiang avatar Jan 08 '20 07:01 johnjiang

This would be great to have! For example, it would be nice if this snippet was type-aware:

period = pendulum.period(start, end)
for dt in period.range("hours"):
    pass

pikeas avatar Dec 11 '20 22:12 pikeas

Fixed in the next release.

Secrus avatar Jun 10 '23 11:06 Secrus

I'm wondering when the next release might be? (2.1.2 was 3 years ago.)

reagle avatar Jul 26 '23 16:07 reagle