Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .github/workflows/CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ This set of tests including [miscellaneous hygiene checks](../../test/repo_hygi

To maintain consistency across this large codebase, InterUSS employs a very strict Python linter. But, there is no need to satisfy the linter manually; simply run `make format` from the repo root to resolve most mere-formatting issues that this check will detect.

Standalone host/build utilities must support Python 3.11 and later. The explicit `tool.ruff.per-file-target-version` list in [pyproject.toml](../../pyproject.toml) covers the Git version utilities, the JSON field extractor, and the packaging entry point. Add new scripts invoked directly with system Python to this list. Both `make python-lint` and `make format` use these targets to reject unsupported syntax and avoid introducing newer syntax when fixing or formatting these files.

#### uss_qualifier documentation validation (`make validate-uss-qualifier-docs`)

uss_qualifier [scenario documentation](../../monitoring/uss_qualifier/scenarios/README.md#documentation) is required and has strict requirements to ensure a strong, consistent, and correct interface between regulators and others concerned only with the concept of what scenarios are doing, and InterUSS contributors concerned with writing the actual code to perform the test. This check validates many of these documentation requirements.
Expand Down
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ extend-exclude = [
]
line-length = 88

[tool.ruff.per-file-target-version]
# Host/build utilities must work with the system Python (3.11+), without uv.
# Add new host entry points here; Docker/uv code uses the project version above.
"scripts/git/get_version.py" = "py311"
"scripts/git/write_version_file.py" = "py311"
"build/dev/extract_json_field.py" = "py311"
"setup.py" = "py311"

[tool.ruff.lint]
# Default + isort + pyupgrade
select = [
Expand Down
2 changes: 1 addition & 1 deletion scripts/git/get_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def get_pep440_version(
try:
info = get_git_info(component)
return derive_pep440_version(info)
except subprocess.SubprocessError, FileNotFoundError, OSError:
except (subprocess.SubprocessError, FileNotFoundError, OSError):
pass

if os.path.exists(VERSION_FILE_PATH):
Expand Down
Loading