Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/code_changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ jobs:
uses: astral-sh/setup-uv@v8.1.0
- name: Check formatting
run: uvx ruff format --check .
- name: Lint
# The ruff rules pyproject.toml selects, then two pyflakes rules it
# ignores, checked in the package: F811, a definition that a later
# one of the same name silently replaces (two PRs that each add a
# Simulation.set_input merge cleanly, and the second wins; uk hub
# notice 16), and F821, an undefined name. Neither has a finding
# in the package today.
run: |
uvx ruff check .
uvx ruff check --select F811,F821 policyengine_uk
Test:
# Linux arm64 keeps the CPU architecture of the macOS runners this job
# used to run on. GitHub-hosted macOS runners are scarce, so PR runs
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/pr_code_changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ jobs:
uses: astral-sh/setup-uv@v8.1.0
- name: Check formatting
run: uvx ruff format --check .
- name: Lint
# The ruff rules pyproject.toml selects, then two pyflakes rules it
# ignores, checked in the package: F811, a definition that a later
# one of the same name silently replaces (two PRs that each add a
# Simulation.set_input merge cleanly, and the second wins; uk hub
# notice 16), and F821, an undefined name. Neither has a finding
# in the package today.
run: |
uvx ruff check .
uvx ruff check --select F811,F821 policyengine_uk
Test:
# Linux arm64 keeps the CPU architecture of the macOS runners this job
# used to run on. GitHub-hosted macOS runners are scarce, so PR runs
Expand Down
1 change: 1 addition & 0 deletions changelog.d/ruff-check-lint.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Run `ruff check` in the Lint job, with the pyflakes rules for a definition silently replaced by a later one (F811) and an undefined name (F821) on for the package, so two merged PRs that each define the same method fail Lint.
Loading