pendulum icon indicating copy to clipboard operation
pendulum copied to clipboard

pendulum.now() type hint doesn't allow datetime.timezone

Open gwerbin opened this issue 1 year ago • 0 comments

The type hint for pendulum.now doesn't permit datetime.timezone a valid input, even though it appears to be valid for the underlying DateTime.now function:

https://github.com/sdispater/pendulum/blob/3e3fec6a5b66759078c5ae39c736ca95b78adbef/src/pendulum/init.py#L247

https://github.com/sdispater/pendulum/blob/3e3fec6a5b66759078c5ae39c736ca95b78adbef/src/pendulum/datetime.py#L158-L160

Is this deliberate, or an oversight?

gwerbin avatar Dec 18 '23 19:12 gwerbin