Skip to content

Promote develop to main: Allow Mypy Strict as a Build Directory's Only Type Checker - #2006

Merged
ptr727 merged 2 commits into
mainfrom
develop
Sep 28, 2026
Merged

ptr727 merged 2 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Summary

Promotes develop to main, carrying #2005.

That PR applies the maintainer's decision on #1941: a build-profile Python directory may use mypy as its only CI type checker, and whichever checker CI runs is held to strict (pyright strict mode, or mypy's strict flags).

  • Spec: python.pyright.config and python.mypy.allowed now match what the validator's type-check step accepts. python.config.placement names mypy's standalone config forms as drift beside pyrightconfig.json.
  • Surfaces: the python-codestyle skill, README.md, and AUDIT.md state the same rule. Strictness is scoped to the build profile, and the "never disagree" claim applies only where CI runs pyright.

A pre-existing gap found along the way, suppression guidance that names only pyright mechanisms, is filed as #2004.

Closes #1941

🤖 Generated with Claude Code

## Summary

This applies the maintainer's decision on #1941: a build-profile Python
directory may use mypy as its only CI type checker. The validator's
type-check step already accepts that configuration. A follow-up answer
holds whichever checker runs in CI to strict.

- `spec/project-types.json`: `python.pyright.config` now says
first-party code is type-checked in CI by pyright strict, by mypy, or by
both, and that each CI checker runs strict (pyright strict mode, mypy's
strict flags). `python.mypy.allowed` now allows mypy as a build
directory's only CI checker.
- `python-codestyle` skill (`SKILL.md`, `references/profiles.md`,
`references/code-style.md`) and `README.md` say the same, including that
mypy runs strict. The skill no longer says a pyright-only repo is the
default when there is no need for mypy. It also no longer calls a
mypy-only repo "inherently consistent", which is true only when the
editor and CI run the same engine.
- The generated skill distributions are regenerated.

Mypy is named by "its strict flags" rather than `strict = true`, because
that key is global and a test tree can only be relaxed flag by flag.

Local strict review: three passes plus a confirming pass, with every
introduced finding fixed. A pre-existing gap it found, suppression
guidance that names only pyright mechanisms, is filed as #2004.

Refs #1941

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 28, 2026 19:08
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 694b3359-283c-4885-9039-24427deeb2a5


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.42%. Comparing base (2583371) to head (a5f3949).
⚠️ Report is 290 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2006   +/-   ##
=======================================
  Coverage   55.42%   55.42%           
=======================================
  Files          16       16           
  Lines        7249     7249           
=======================================
  Hits         4018     4018           
  Misses       3231     3231           
Flag Coverage Δ
python-3.13 55.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

A few documentation lines in the canonical docs/skills are ambiguous or misleading under the new “mypy-only CI” allowance and should be clarified to avoid incorrect local guidance.

Review effort: Lite
Findings: 3 Low severity

Open (3)
What changed in this PR

Promotes develop to main while aligning the fleet’s Python typing contract so a build-profile Python directory may use mypy (with strict flags) as its only CI type checker (or pyright strict, or both), and documenting that whichever checker runs in CI is held to strict.

Changes:

  • Updated spec/project-types.json Python checks to explicitly allow pyright strict, mypy strict, or both for build-profile directories and to treat standalone mypy configs as drift (outside the Home Assistant exception).
  • Updated repository-level docs (README.md, AUDIT.md) to reflect the same “CI type checker(s) are strict and gating” rule.
  • Updated the canonical Python codestyle skill source under .agents/skills/ and regenerated the distributed copies under .github/skills/ and .claude-plugin/fleet-skills/ (including digest refresh).
File Description
spec/​project-types.json Expands the build-profile type-checking contract to allow mypy-only strict (or pyright strict, or both).
README.md Updates the high-level Python checklist text to reflect the expanded type-checker options.
AUDIT.md Updates the audit dimension summary for Python to include mypy as an allowed strict CI checker.
.github/​skills/​python-codestyle/​SKILL.md Regenerated distributed skill copy reflecting updated typing guidance.
.github/​skills/​python-codestyle/​references/​profiles.md Regenerated distributed reference copy reflecting updated CI type-checker options.
.github/​skills/​python-codestyle/​references/​code-style.md Regenerated distributed reference copy reflecting updated strictness wording.
.claude-plugin/​fleet-skills/​skills/​python-codestyle/​SKILL.md Regenerated Claude plugin skill copy reflecting updated typing guidance.
.claude-plugin/​fleet-skills/​skills/​python-codestyle/​references/​profiles.md Regenerated Claude plugin reference copy reflecting updated CI type-checker options.
.claude-plugin/​fleet-skills/​skills/​python-codestyle/​references/​code-style.md Regenerated Claude plugin reference copy reflecting updated strictness wording.
.claude-plugin/​fleet-skills/​.source-digests/​python-codestyle Updates the plugin digest to match regenerated skill content.
.agents/​skills/​python-codestyle/​SKILL.md Canonical skill source updated to document mypy-only strict CI as a supported build-profile configuration.
.agents/​skills/​python-codestyle/​references/​profiles.md Canonical reference updated to reflect new mypy-only strict CI allowance.
.agents/​skills/​python-codestyle/​references/​code-style.md Canonical reference updated to clarify strict mypy usage when mypy is the CI checker.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .agents/skills/python-codestyle/SKILL.md
Comment thread .agents/skills/python-codestyle/references/profiles.md Outdated
Comment thread README.md Outdated
## Summary

Review of promotion #2006 found that "pyright strict, mypy with its
strict flags in CI and the editor with pyright editor-only, or both"
parses as two separate alternatives. This change puts where mypy runs,
and what pyright does beside it, in a parenthetical attached to the mypy
option. That leaves exactly three alternatives, in `README.md` and in
`python-codestyle/references/profiles.md`.

A local strict review pass found nothing.

Refs #1941

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 28, 2026 19:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The canonical python-codestyle skill introduces ambiguous build-profile wording that should be clarified and then re-distributed to keep generated skill copies consistent.

Review effort: Lite
Findings: None

Resolved since last review (3)

@ptr727
ptr727 merged commit f188576 into main Sep 28, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python Build Profile's Pyright Rule Disagrees With the Gate's Mypy-Only Acceptance

2 participants