Wykres commitów

6 Commity (master)

Autor SHA1 Wiadomość Data
Angus Gratton 00fc3fd37b all: Enable ruff E401 and E402 import lints.
Mostly small cleanups to put each top-level import on its own line.  But
explicitly disable the lint for examples/tests which insert the current
directory into the path before importing.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2024-05-17 17:06:33 +10:00
Angus Gratton 992eecfed4 all: Enable Ruff lint F541 'f-string without any placeholders'.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
2024-05-15 18:11:46 +10:00
Angus Gratton 6c6fab1db1 all: Enable ruff F841 'Local variable is assigned to but never used'.
Most of these look like they were used for print debugging and then kept in
when the print statements were removed or commented.

Some look like missing or incomplete functionality, these have been marked
with comments where possible.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2024-05-15 18:05:21 +10:00
Jim Mussared cee0945f1c all: Replace "black" with "ruff format".
- Add config for [tool.ruff.format] to pyproject.toml.
- Update pre-commit to run both ruff and ruff-format.
- Update a small number of files that change with ruff's rules.
- Update CI.
- Simplify codeformat.py just forward directly to "ruff format"

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-12-20 11:56:24 +11:00
Angus Gratton 5b6fb2bc56 top: Enable Ruff linter to check undefined-name (F821).
Also adds some global ignores for manifest files (which have implicit
imports) and the multitests (which have the same).

Other F821 fixes or accommodations are in the parent commits to this
commit.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-08-22 22:44:01 +10:00
Christian Clauss 4da6e6f1b2 all: Lint Python code with ruff.
Signed-off-by: Christian Clauss <cclauss@me.com>
2023-07-24 07:51:33 +02:00