You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ refurb testcase.py
testcase.py:11:13 [FURB126]: Replace `case _: return x` with `return x`
Run `refurb --explain ERR` to further explain an error. Use `--quiet` to silence this message
But it should not be emitting an error instance because the match is on an expression that I don't want to repeat.
The most straightforward interpretation of the suggested fix would be doing:
is not too bad but I prefer the original form. This also isn't a super obvious change to make based on the error suggestion as it mentions case _ but I'm not using the underscore pattern.
Version Info
Refurb: v2.0.0
Mypy: v1.9.0
Python Version
Python 3.10.12
Config File
# N/A
Extra Info
None
The text was updated successfully, but these errors were encountered:
Has your issue already been fixed?
master
branch? See the docs for instructions on how to setup a local build of Refurb.The Bug
The following code:
Emits the following error:
But it should not be emitting an error instance because the match is on an expression that I don't want to repeat.
The most straightforward interpretation of the suggested fix would be doing:
but that's bad.
Doing
is not too bad but I prefer the original form. This also isn't a super obvious change to make based on the error suggestion as it mentions
case _
but I'm not using the underscore pattern.Version Info
Python Version
Python 3.10.12
Config File
# N/A
Extra Info
None
The text was updated successfully, but these errors were encountered: