Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use explicit Optional when default = None #704

Closed
rekyungmin opened this issue Oct 22, 2021 · 0 comments
Closed

Use explicit Optional when default = None #704

rekyungmin opened this issue Oct 22, 2021 · 0 comments

Comments

@rekyungmin
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants