Skip to content

Add basedpyright pre-commit hook to match canonical linting #140

Description

Summary

The canonical pre-commit linting setup in actions-template includes the basedpyright type-checker hook. This repository ships Python helper code 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): 5 errors, 32 warnings

Remediation needed

Small. Add basedpyright config via pyrightconfig.json (typeCheckingMode = "standard") and resolve the 5 errors.

Acceptance criteria

  • basedpyright config added (pyrightconfig.json or pyproject.toml)
  • basedpyright hook added, preserving existing config
  • prek run basedpyright --all-files reports 0 errors
  • CI green

Context: fleet-wide linting-standardization sweep. Canonical reference config lives in lfreleng-actions/actions-template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions