flake8-simplify
flake8-simplify copied to clipboard
❄ A flake8 plugin that helps you to simplify code
## Explanation References (and function calls in some cases) are about as simple as you can get. Lambdas aren't too bad, but a bit more complicated. Functions from operator can...
## Desired change * **Rule(s)**: SIM300 * **Adjustment**: Don't trigger if both sides of a comparison are literals ## Explanation These comparisons are pointless, but swapping them around (only to...
## Desired change * **Rule(s)**: SIM904 * **Adjustment**: It should not trigger for "create or update" logic when it comes to dictionaries ## Explanation The warning points at the wrong...
## Explanation Implement the checking for branches with identical arm bodies for `match` Same benefits as https://github.com/MartinThoma/flake8-simplify/issues/10 Python 3.10+ ## Example ```python # Bad match hello: case "world": print("world") case...