You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The section of the documentation about code style tools is discussing the use of Black and isort for code formatting and Flake8 for code linting (https://dev.docs.pyansys.com/coding-style/formatting-tools.html).
Moving forward, we might want to promote using Ruff ("an extremely fast Python linter and code formatter, written in Rust", see https://docs.astral.sh/ruff/) for both tasks and therefore remove the presentations of Blake, isort and Flake8.
In place of the brief descriptions of how to configure these three tools, a short overview of the main relevant features of Ruff could be provided - especially mentioning that it offers what the previous tools achieved - together with a possible approach to migrating a project towards using Ruff, by incrementally adding rules and fixing the triggered errors accordingly.
Other parts of the documentation will be updated to reflect this change where appropriate.
It should be noted, however, that blacken-docs, used for formatting Python code blocks in documentation files, cannot currently be replaced by Ruff, which does not support formatting/linting of embedded code (particularly in .rst or .md files, see astral-sh/ruff#8237). Similarly, blacken-docs does not support the Ruff formatter as an alternative for Black (see adamchainz/blacken-docs#352).
Therefore, the use of blacken-docs is still recommended and the section of the documentation presenting this tool will be left unchanged despite its dependence on Black.
Useful links and references
No response
The text was updated successfully, but these errors were encountered:
Description of the modifications
The section of the documentation about code style tools is discussing the use of Black and isort for code formatting and Flake8 for code linting (https://dev.docs.pyansys.com/coding-style/formatting-tools.html).
Moving forward, we might want to promote using Ruff ("an extremely fast Python linter and code formatter, written in Rust", see https://docs.astral.sh/ruff/) for both tasks and therefore remove the presentations of Blake, isort and Flake8.
In place of the brief descriptions of how to configure these three tools, a short overview of the main relevant features of Ruff could be provided - especially mentioning that it offers what the previous tools achieved - together with a possible approach to migrating a project towards using Ruff, by incrementally adding rules and fixing the triggered errors accordingly.
Other parts of the documentation will be updated to reflect this change where appropriate.
It should be noted, however, that blacken-docs, used for formatting Python code blocks in documentation files, cannot currently be replaced by Ruff, which does not support formatting/linting of embedded code (particularly in .rst or .md files, see astral-sh/ruff#8237). Similarly, blacken-docs does not support the Ruff formatter as an alternative for Black (see adamchainz/blacken-docs#352).
Therefore, the use of blacken-docs is still recommended and the section of the documentation presenting this tool will be left unchanged despite its dependence on Black.
Useful links and references
No response
The text was updated successfully, but these errors were encountered: