[Python] any python pre-commit formatter to fix relative imports to absolute ones?

Discussão em 'Python' iniciado por Stack, Agosto 8, 2025.

  1. Stack

    Stack Membro Participativo

    I know about tools like isort and ruff, which can detect relative imports and point to them in precommit logs. But I want to find a tool that can not only detect, but also immediately fix relative imports to absolute ones, without going beyond the "package boundaries". In general, I'm not looking for a linter, but a formatter.

    I also came across this question, which notes a repository that is now an archive (I think the decision made by the repository owner is not entirely justified, since ruff is not a formatter for this case). However, this solution does not suit me either. Using code that has been unsupported for several years on a large project is not the best idea.

    Continue reading...

Compartilhe esta Página