Summary
>>> url = "www.example.com"
>>> url.split(".", maxsplit=1)[0]
'www'
>>> url.split(".", maxsplit=1)[-1]
'example.com'
>>> url.split(".")[-1]
'com'
we can see the the maxsplit change the result when getting the last element, but ruff suggest: PLC0207 Accessing only the first or last element of str.split() without setting maxsplit=1
but this rule doesn't make sense for the last element, it should only be suggested for the first element, or I'm missing something 🤔
Version
ruff 0.11.12 (aee3af0 2025-05-29)