Summary
I ran ruff rule PLC0207 on Sympy sympy/printing/pycode.py and noticed while it was able to recognize that the last item should have maxsplit, it did not propogate the split to the earlier chained splits.
- return fqn.split('(')[0].split('[')[0].split('.')[-1]
+ return fqn.split('(')[0].split('[')[0].rsplit('.', maxsplit=1)[-1]
it should be
- return fqn.split('(')[0].split('[')[0].split('.')[-1]
+ return fqn.split('(', maxsplit=1)[0].split('[', maxsplit=1)[0].rsplit('.', maxsplit=1)[-1]
The rule acceptance settings should be relaxed slightly in this case. so that maxsplit can propogate to all the other values in the chained split.
Summary
I ran ruff rule PLC0207 on Sympy
sympy/printing/pycode.pyand noticed while it was able to recognize that the last item should have maxsplit, it did not propogate the split to the earlier chained splits.it should be
The rule acceptance settings should be relaxed slightly in this case. so that maxsplit can propogate to all the other values in the chained split.