Closed spaceone closed 1 year ago
Definitely a bug, but where did you run into this :joy:
Amazing 😆
SIM103
definitely doesn't make sense. It could become:
def foo(exc):
exc.getcode() # Still have to call because of potential side effects.
return False
But then there could also be side effects if someone overloaded __eq__
to do some evil... 🙈
Maybe a check to identify that all branches have the same statements within?
causes:
foo.py:2:5: SIM103 Return the condition `exc.getcode() == 401` directly