debian-forge/tools
Achilleas Koutsou ac83e4541c tools/osbuild-image-info: code quality and style improvements
Run isort for imports.
Pylint: wrong-import-order / C0411
Solves the following linter warnings:
- standard import "pathlib" should be placed before third party import
  "yaml"
- standard import "collections.OrderedDict" should be placed before
  third party imports "yaml", "jsonschema"
- standard import "typing.Dict" should be placed before third party
  imports "yaml", "jsonschema"

Fix default arg values.
Pylint: dangerous-default-value / W0102
- Using mutable default values ([]) for function arguments is considered
  dangerous.

Rename format variable.
Pylint: redefined-builtin / W0622
- 'format' is a built-in function.

Use f-strings instead of formatting where possible.
Pylint: consider-using-f-string / C0209

Remove unnecessary else after returns.
Pylint: no-else-return / R1705

Remove unnecessary else after continue.
Pylint: no-else-continue / R1724

Set the encoding (utf-8) for all calls to open().
Pylint: unspecified-encoding / W1514

Disable the too-many-branches and too-many-statements warnings for
append_partitions() and append_filesystem().  We can refactor the
functions to make them smaller later, but for now we're addressing only
the simpler issues.

Initialise with dict literal instead of call to function.
Pylint: use-dict-literal / R1735

Use implicit truthiness for glob instead of len().
Pylint: use-implicit-booleaness-not-len / C1802

Rename ambiguous variable 'l' to 'line'.
pycodestyle: ambiguous-variable-name (E741)

Merge comparisons with 'in'.
Pylint: consider-using-in / R1714
2025-01-10 17:18:05 +01:00
..
test Test: add unit test for osbuild-image-info's read_boot_entries() 2025-01-04 10:37:05 +01:00
check-runners tools: add "tools" dir to LINTABLES and fix issues 2023-11-13 10:10:12 +01:00
check-snapshots check-snapshots: add log info when a download fails 2024-02-20 14:52:23 -08:00
gen-stage-test-diff tools: make gen-stage-test-diff pylint clean 2024-02-20 14:52:23 -08:00
inline-source.py tools: add inline-source.py 2021-05-12 14:26:16 +02:00
lorax-template-pkgs.py osbuild: run isort on all files 2022-09-12 13:32:51 +02:00
osbuild mpp: combine depsolve and import into mpp.py 2021-06-30 20:26:07 +01:00
osbuild-depsolve-dnf osbuild-depsolve-dnf: add SBOM support for DNF5 2024-12-02 23:24:39 +01:00
osbuild-dev lint: explicit check 2024-03-05 16:10:27 +01:00
osbuild-image-info tools/osbuild-image-info: code quality and style improvements 2025-01-10 17:18:05 +01:00
osbuild-json-seq-progress-example-renderer tools: add example json-seq render based on tqdm 2024-03-12 16:44:12 +01:00
osbuild-mpp osbuild-mpp: Fix error on python < 3.11 2024-11-27 00:06:08 +01:00
set-env-variables.sh tools: add set-env-variables.sh 2022-04-13 14:57:27 +02:00
solver-dnf.json osbuild-depsolve-dnf: refactor into osbuild.solver module 2024-08-01 08:57:30 +02:00
solver-dnf5.json osbuild-depsolve-dnf: refactor into osbuild.solver module 2024-08-01 08:57:30 +02:00
tree-diff tools/tree-diff: use null for timestamped files 2024-06-06 15:41:49 +01:00