Skip to content

First argument of localdate() and localtime() should be Optional #104

Closed
@nuschk

Description

@nuschk

In timezone.pyi, instead of

def localtime(value: _AnyTime, timezone: Optional[tzinfo] = None) -> datetime: ...
def localdate(value: _AnyTime, timezone: Optional[tzinfo] = None) -> date: ...

these should quite simply be:

def localtime(value: Optional[_AnyTime] = None, timezone: Optional[tzinfo] = None) -> datetime: ...
def localdate(value: Optional[_AnyTime] = None, timezone: Optional[tzinfo] = None) -> date: ...

This is true for django >= 1.11, so well within the scope of django-stubs.

Oh, and thank you so much for this great package! <3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions