mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Use black and isort to reformat new code in tuf/api/*, like so: ``` black --line-length 80 api isort --line-length 80 --profile black api ``` Besides downsizing the default line length to fit our Code Style Guide no extra configuration is required. Unified format according to black and isort will be enforced by CI/CD in a future commit. **Changes include:** - Use double quotes instead of single quotes where feasible - Re-wrap and re-indent long lines such as dict literals, function signatures and function calls, using hanging indent This will require an update in our Code Style Guide, which the benefits of using black seem worth. https://github.com/secure-systems-lab/code-style-guidelines/blob/master/python.md#indentation-and-line-continuation - Update vertical and horizontal spacing - Sort and wrap imports See black and isort docs for details: https://black.readthedocs.io/en/stable/the_black_code_style.html https://pycqa.github.io/isort/docs/configuration/black_compatibility/ NOTE: If desired I can split commits by change and/or configure git for this repo to ignore the corresponding revision(s) in git-blame. https://github.com/psf/black#migrating-your-code-style-without-ruining-git-blame Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| json.py | ||