#5492 (Automated code formatting and linting (yapf, ruff, ...))
by Luc Saffre · in Developers · assigned to Luc Saffre
Summary
Children
Comments
- 2 years, 4 months ago by Luc Saffre about #5492 (Automated code formatting and linting (yapf, ruff, ...)) : I ran "ruff format" in two repositories: lino and cosi. I pushed these changes, so every developer should pull them. They contain many "pseudo" changes: it's just about coding style. @8lurry we might have a jitsi session to look at [url gitlab.com/lino-framework/lino/-/commit/c51b94e5e2800f0e5857b8ea5366d3...
- 2 years, 4 months ago by Luc Saffre about #5492 (Automated code formatting and linting (yapf, ruff, ...)) : I made another series of small changes in many repositories, so please run "pp git pull" (or "pp git fetch upstream && git merge/master" if you have a fork).
- 2 years, 4 months ago by Luc Saffre about #5492 (Automated code formatting and linting (yapf, ruff, ...)) (2 replies) : I discovered [url docs.astral.sh/ruff/ Ruff] and ran it locally cosi, and i like the result. It seems that ruff does more than yapf. But before starting to use it systematically we need a way to protect files like help_texts.py from getting formatted (which is done with yapf by adding a comment "yap...
- 2 years, 7 months ago by Luc Saffre about #5492 (Automated code formatting and linting (yapf, ruff, ...)) : I just ran the following command to push a commit to all repositories: pp -d git ci -am "run 'inv bd' to add 'yapf:disable' to help_texts.py files"; git push
- 2 years, 7 months ago by Luc Saffre about #5492 (Automated code formatting and linting (yapf, ruff, ...)) : On Feb 21 I learned that the help_texts.py files should *not* get formatted. Because that causes unrealistic diffs when they get re-generated.
- 2 years, 7 months ago by Luc Saffre about #5492 (Automated code formatting and linting (yapf, ruff, ...)) (1 reply) : Some time ago I had added a command "inv pepper" and run it on all our repositories.
- 2 years, 7 months ago by Luc Saffre about #5492 (Automated code formatting and linting (yapf, ruff, ...)) : Created new Ticket #5492@dev (Automated code formatting and linting).