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

Mark optional params as Optional #5128

Merged
merged 2 commits into from Mar 2, 2023

Conversation

JensHeinrich
Copy link

@JensHeinrich JensHeinrich commented Mar 1, 2023

Mark parameters as Optional if they are
skip change file check

@JensHeinrich
Copy link
Author

Yes, those annoy me because my editor is too angry

@JonathanPlasse
Copy link

You should remove implicit_optional = true from mypy configuration.

@JensHeinrich
Copy link
Author

You should remove implicit_optional = true from mypy configuration.

Pretty sure that won't work as my editor is using pyright

@JensHeinrich
Copy link
Author

You should remove implicit_optional = true from mypy configuration.

Pretty sure that won't work as my editor is using pyright

And I do like to do things correctly

@JonathanPlasse
Copy link

It should be removed because you are removing implicit optional.
This is present because there were implicit optional.

@JensHeinrich
Copy link
Author

It should be removed because you are removing implicit optional. This is present because there were implicit optional.

I just had a look for this option, and according to this article mypy disallows implicit optional since version 0.99.
The implicit optional type has been removed from PEP 484 in python/peps#689

pydantic/fields.py Outdated Show resolved Hide resolved
@hramezani hramezani merged commit 7f3b754 into pydantic:1.10.X-fixes Mar 2, 2023
@hramezani
Copy link
Member

Thanks @JensHeinrich

@JensHeinrich JensHeinrich deleted the fix/Typing branch March 7, 2023 06:54
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

Successfully merging this pull request may close these issues.

None yet

5 participants