This is an example where the mentioned rule(s) would currently be suboptimal:
from pprint import pprint
things = """
some configuration
- a
- b
- more:
- d
- e
""".split("\n")
pprint(things)
SIM905 rule output:
example.py:3:10: SIM905 Use '["some", "configuration", "-", "a", "-", "b", "-", "more:", "-", "d", "-", "e"]' instead of '"
some configuration
- a
- b
- more:
- d
- e
".split()'
from pprint import pprint
things = """
some configuration
- a
- b
- more:
- d
- e
""".split(sep=None, maxsplit=2)
pprint(things)
SIM905 rule output:
example.py:3:10: SIM905 Use '["some", "configuration", "-", "a", "-", "b", "-", "more:", "-", "d", "-", "e"]' instead of '"
some configuration
- a
- b
- more:
- d
- e
".split()'
Explanation
SIM905 incorrectly identifies cases where split is used with arguments
Example
This is an example where the mentioned rule(s) would currently be suboptimal:
SIM905 rule output:
This is different from the program output:
Example with
maxsplit
SIM905 rule output:
This is different from the program output: