Skip to content

Use explicit Optional when default = None #704

@rekyungmin

Description

@rekyungmin

Implicit optional is not PEP484 compliant.

This is no longer the recommended behavior. Type checkers should move towards requiring the optional type to be made explicit.

Also Mypy will error on it in the future: python/mypy#9091

Expected Result

Use explicit Optional when default = None

Actual Result

Some implicit optionals are used.

Reproduction Steps

$ mypy --no-implicit-optional jwt

mypy fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions