Set default strict_optional state to True by hauntsaninja · Pull Request #18198 · python/mypy (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation6 Commits3 Checks18 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

hauntsaninja

@hauntsaninja

@github-actions GitHub Actions

This comment has been minimized.

@hauntsaninja

Looks like some of the strict optional behaviour is a little buggy, e.g. not symmetric join / meet

@hauntsaninja

@github-actions GitHub Actions

This comment has been minimized.

@hauntsaninja

@github-actions GitHub Actions

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@cdce8p

Should we consider removing the --implicit-optional and --no-strict-optional options and related code all together, maybe for the 2.0 release (#17967)?

--implicit-optional was disabled by default in 0.980.

@JukkaL

We still use --no-strict-optional for some legacy code at work. Migrating away from it can be tricky, so we may have to keep it around for a long time. --implicit-optional doesn't need much maintenance, so I think we can also keep it around. It's hard to know how popular various flags are in private codebases.