-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed as not planned
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
SIM108 suggests using ternary operators whenever possible due to readability.
But ternary operators can not be covered.
Here is a well-known issue of one of the most used Python coverage tools - coverage.py
SIM108 should be completely removed since that is not the only issue mentioned here. It creates more problems than it actually solves.
And at the end of the day, it is quite a personal opinion if a ternary operator is easier to read, than if/else block
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule