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

Enable --new-type-inference by default #15906

Closed
ilevkivskyi opened this issue Aug 18, 2023 · 3 comments · Fixed by #16345
Closed

Enable --new-type-inference by default #15906

ilevkivskyi opened this issue Aug 18, 2023 · 3 comments · Fixed by #16345

Comments

@ilevkivskyi
Copy link
Member

I think we should be able to do this in mypy 1.7.0. After enabling this by default, new inference scheme will still be used as a fallback. And we can make it the main mechanism later on.

This is a follow-up for series started by #15287

@ilevkivskyi
Copy link
Member Author

cc @JukkaL

@ilevkivskyi ilevkivskyi changed the title Enable --new-typeinference by default Enable --new-type-inference by default Aug 18, 2023
@ghost
Copy link

ghost commented Oct 16, 2023

Is there any way for me, as a plain-old user, to opt-in ahead of time? I see a commandline option, but didn't find anything in the configuration reference.

@ilevkivskyi
Copy link
Member Author

I am not 100% sure, but you can try new_type_inference = true in the main section of config file. This flag is not supported for per-module configuration. But also I am going to make it default in master this or next week (and it will be released in 1.7.0).

ilevkivskyi added a commit that referenced this issue Oct 28, 2023
Fixes #15906

I am adding `--old-type-inference` so people can disable the flag if
they have issues (for few releases). IIRC there will be some fallback in
`mypy_primer`, but last time I checked it was all correct. Also I don't
remember if we need to update some tests, but we will see.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant