Skip to content

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

Description

@gwerbin

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions