Skip to content

Conversation

hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Apr 21, 2023

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.

@github-actions
Copy link
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 hauntsaninja deleted the simplif branch April 21, 2023 07:50
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
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.

1 participant