| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Teach true_only and false_only to produce the single possible boolean literal directly, just as false_only already does for empty strings and integer zero. Truthiness checks and boolean operators can then stop expanding bool into a union before asking these helpers to restrict it. Authored by Codex
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Teach true_only and false_only to produce the single possible boolean literal directly, just as false_only already does for empty strings and integer zero.
Truthiness checks and boolean operators can then stop expanding bool into a union before asking these helpers to restrict it.
Authored by Codex