MartinThoma / flake8-simplify

❄ A flake8 plugin that helps you to simplify code
MIT License
186 stars 19 forks source link

[Adjust Rule] SIM109 - Suggest tuple instead of list #78

Closed mxr closed 2 years ago

mxr commented 2 years ago

Desired change

Explanation

See rationale here

Example

This change would update the error message as follows:

- SIM109 Use 'a in [b, c]' instead of 'a == b or a == c'
+ SIM109 Use 'a in (b, c)' instead of 'a == b or a == c'
MartinThoma commented 2 years ago

@mxr Thank you for the suggestion! I've added it in flake8-simplify==0.14.4 :-)