Summary
The canonical pre-commit linting setup in actions-template includes the basedpyright type-checker hook. This repository ships Python helper code (~12 .py files) but its .pre-commit-config.yaml is missing that hook. This issue tracks adding it.
Canonical hook block
# Requires a mirror, primary repo lacks .pre-commit-hooks.yaml
- repo: https://github.com/DetachHead/basedpyright-prek-mirror
rev: d55eabd2531b4f4a4c49c30fba627ce3a636ab79 # frozen: 1.39.9
hooks:
- id: basedpyright
Insert this block into the existing config; preserve any repo-specific customizations rather than wholesale-copying the canonical file.
Current state (basedpyright 1.39.9)
[tool.basedpyright] config: absent (no pyproject.toml)
- Baseline scan (default "recommended" mode): 3 errors, 117 warnings
Remediation needed
Small. This repo has no pyproject.toml, so add basedpyright config via a pyrightconfig.json (or a minimal [tool.basedpyright] if a pyproject.toml is introduced): typeCheckingMode = "standard", then resolve the 3 errors.
Acceptance criteria
Context: fleet-wide linting-standardization sweep. Canonical reference config lives in lfreleng-actions/actions-template.
Summary
The canonical pre-commit linting setup in
actions-templateincludes thebasedpyrighttype-checker hook. This repository ships Python helper code (~12.pyfiles) but its.pre-commit-config.yamlis missing that hook. This issue tracks adding it.Canonical hook block
Insert this block into the existing config; preserve any repo-specific customizations rather than wholesale-copying the canonical file.
Current state (basedpyright 1.39.9)
[tool.basedpyright]config: absent (nopyproject.toml)Remediation needed
Small. This repo has no
pyproject.toml, so add basedpyright config via apyrightconfig.json(or a minimal[tool.basedpyright]if apyproject.tomlis introduced):typeCheckingMode = "standard", then resolve the 3 errors.Acceptance criteria
pyrightconfig.jsonorpyproject.toml)basedpyrighthook added, preserving existing configprek run basedpyright --all-filesreports 0 errorsContext: fleet-wide linting-standardization sweep. Canonical reference config lives in
lfreleng-actions/actions-template.