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

Implicit optionals no longer allowed in type checking with Mypy #360

Closed
goodmami opened this issue Jan 5, 2023 · 0 comments
Closed

Implicit optionals no longer allowed in type checking with Mypy #360

goodmami opened this issue Jan 5, 2023 · 0 comments
Labels
maintenance improving code quality; not features or bugs

Comments

@goodmami
Copy link
Member

goodmami commented Jan 5, 2023

Implicit optional argument types are no longer allowed by default with recent versions of Mypy:

def foo(x: int = None) -> int:  # type check error
    ...

They should now be:

def foo(x: Optional[int] = None) -> int:
    ...
@goodmami goodmami added the maintenance improving code quality; not features or bugs label Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance improving code quality; not features or bugs
Projects
None yet
Development

No branches or pull requests

1 participant