Remove potentially dead code from make_simplified_union#15094
Closed
hauntsaninja wants to merge 1 commit intopython:masterfrom
Closed
Remove potentially dead code from make_simplified_union#15094hauntsaninja wants to merge 1 commit intopython:masterfrom
hauntsaninja wants to merge 1 commit intopython:masterfrom
Conversation
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: mypy (https://github.com/python/mypy)
+ mypy/checker.py:1389: error: Left operand of "or" is always false [redundant-expr]
pytest (https://github.com/pytest-dev/pytest)
+ src/_pytest/config/findpaths.py:217: error: Right operand of "or" is never evaluated [unreachable]
Tanjun (https://github.com/FasterSpeeding/Tanjun)
+ tanjun/commands/slash.py:808: error: Statement is unreachable [unreachable]
dragonchain (https://github.com/dragonchain/dragonchain)
+ dragonchain/transaction_processor/level_4_actions.py:119:5: error: Need type annotation for "validations" (hint: "validations: List[<type>] = ...") [var-annotated]
cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/update.py: note: In function "checkversion":
+ cwltool/update.py:277:5: error: Statement is unreachable [unreachable]
rich (https://github.com/Textualize/rich)
+ rich/table.py:666: error: Right operand of "or" is never evaluated [unreachable]
+ rich/table.py:674: error: Right operand of "or" is never evaluated [unreachable]
+ rich/style.py:713: error: If condition is always true [redundant-expr]
streamlit (https://github.com/streamlit/streamlit)
+ lib/streamlit/runtime/runtime.py: note: In member "connect_session" of class "Runtime":
+ lib/streamlit/runtime/runtime.py:368:82: error: Right operand of "or" is never evaluated [unreachable]
|
hauntsaninja
added a commit
to hauntsaninja/mypy
that referenced
this pull request
Apr 21, 2023
Add a test for the code path exercised in python#15094
JelleZijlstra
pushed a commit
that referenced
this pull request
Apr 21, 2023
Add a test for the code path exercised in #15094
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was looking into optimising a couple code paths. This change is likely incorrect, but unit tests seemed to pass for me locally without this. We should have a test that covers this and hopefully primer reveals one.