mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Configure lint build in tox.ini to check if code in tuf/api/* is formatted according to black and isort style rules: https://black.readthedocs.io/en/stable/the_black_code_style.html https://pycqa.github.io/isort/ In addition to our new style guide (#1128) and corresponding linter configuration, requiring auto-formatting should help to further reduce reviewing effort. The auto-formatter black was chosen for the following reasons: - It seems to be the most popular formatter in the Python ecosystem - It is well documented including integration instructions with most of the tools we use (git, GitHub Actions, pylint, a range of editors, pyproject.toml #1161) - It checks that the reformatted code produces a valid AST that is equivalent to the original - It has almost no ways of customization, which means no customization effort required, and more (cross-project) style uniformity, lowering contribution barriers - It converts single to double quotes, where reasonable, which is exactly what we recommend - The style choices it makes seem generally reasonable and don't conflict with our style guide, except for favoring hanging over aligned indentation, which is the opposite of what we recommend. But we are willing to update the adapt our style guide. Auto-format pre-commit configuration will be added in a subsequent commit. Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu> |
||
|---|---|---|
| .. | ||
| adr | ||
| images | ||
| latex | ||
| papers | ||
| AUTHORS.txt | ||
| CHANGELOG.md | ||
| CLI.md | ||
| CODE-OF-CONDUCT.md | ||
| CONTRIBUTORS.rst | ||
| GETTING_STARTED.rst | ||
| GOVERNANCE.md | ||
| INSTALLATION.rst | ||
| MAINTAINERS.txt | ||
| METADATA.md | ||
| OVERVIEW.rst | ||
| QUICKSTART.md | ||
| RELEASE.md | ||
| ROADMAP.md | ||
| SECURITY.md | ||
| TAP.rst | ||
| tuf-spec.0.9.txt | ||
| tuf-spec.md | ||
| tuf-spec.txt | ||
| TUTORIAL.md | ||