mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-22 17:47:48 -06:00
chore: lint with ruff in CI, drop mypy baseline
The code now carries no type error and no ruff finding. CI runs mypy bare and ruff with the rule set of pyproject.toml; pr_checks.py and the contribution guide list both. The baseline and its tooling go.
This commit is contained in:
1 parent
f1e5cb3f5f
commit
8f1b88bb7e
7 files changed
+54
-73
No files matched your search
@@ -35,9 +35,8 @@ on:
|
||||
- "recipes/**"
|
||||
- "measurements/**"
|
||||
- "website/**"
|
||||
# The type check's configuration and baseline.
|
||||
# The type check's and the lint's configuration.
|
||||
- "pyproject.toml"
|
||||
- "mypy-baseline.txt"
|
||||
# Spelled out twice because the workflow parser reads no YAML anchor. A test
|
||||
# holds the two lists equal.
|
||||
push:
|
||||
@@ -67,7 +66,6 @@ on:
|
||||
- "measurements/**"
|
||||
- "website/**"
|
||||
- "pyproject.toml"
|
||||
- "mypy-baseline.txt"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -173,16 +171,21 @@ jobs:
|
||||
- name: Validate platform configs and emulator profiles
|
||||
run: python scripts/validate_schemas.py --source-only
|
||||
|
||||
# The annotations are checked against mypy-baseline.txt, the errors the
|
||||
# code carried when the check started: a new error fails, and so does
|
||||
# an entry that no longer occurs until the baseline is synced. mypy
|
||||
# reads no installed package (no_site_packages in pyproject.toml), so
|
||||
# what this job has installed does not change the result.
|
||||
# The code carries no type error, so any error fails. mypy reads no
|
||||
# installed package (no_site_packages in pyproject.toml), so what this
|
||||
# job has installed does not change the result.
|
||||
- name: Type-check the scripts and the installer
|
||||
run: |
|
||||
pip install "mypy==2.4.1" "mypy-baseline==0.7.4"
|
||||
mypy > "$RUNNER_TEMP/mypy.txt" || true
|
||||
mypy-baseline filter --no-colors < "$RUNNER_TEMP/mypy.txt"
|
||||
pip install "mypy==2.4.1"
|
||||
mypy
|
||||
|
||||
# The rule set lives in pyproject.toml: pyflakes, the B rules,
|
||||
# simplify, perf, pyupgrade, and the complexity and size limits that
|
||||
# keep a function to one stage. No finding is waived in a baseline.
|
||||
- name: Lint the scripts, the tests and the installer
|
||||
run: |
|
||||
pip install "ruff==0.17.3"
|
||||
ruff check --output-format=github .
|
||||
|
||||
# A profile written from a clone can cite lines that do not hold the value
|
||||
# it declares, and schemas and tests pass it. Each profile a change adds is
|
||||
|
||||
Reference in new issue
Block a user