Mahveotm added a comment.
Hi @Xqt, I have tested this extensively locally, and here are my thoughts,
> it fails if the module docstring starts with preleading r
Yes, ruff handled that correctly.
> it does not always preserve the import section if module docstring is
followed by comments
Also yes, ruff preserves the comment block and inserts the future import
after it correctly.
for this part
> group non-aliased imports from the same module
Both ruff and the pinned isort grouped them in my tests.
For
> separate test distingued from ruff-check;
we can do something like this if we want,
- id: ruff-check
alias: ruff
args: [--fix, --extend-ignore, I]
- id: ruff-check
name: ruff-isort
alias: ruff-isort
args: [--fix, --select, I]
and then run,
pre-commit run ruff-isort -a
Let me know if you have any other questions.
Thank you.
TASK DETAIL
https://phabricator.wikimedia.org/T434949
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]