You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow Mypy Strict as a Build Directory's Only Type Checker - #2005
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.
The validator's type-check step accepts a declared directory whose
config names mypy or pyright, while python.pyright.config scored a
mypy-only build directory as a finding. Per the maintainer's decision
on #1941, relax python.pyright.config and python.mypy.allowed to match
the gate: a build directory is type-checked in CI by pyright strict,
by mypy, or by both, and pyright runs strict wherever it is a CI
checker.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The first commit dropped the build profile's strictness bar for a
mypy-only directory, so an empty [tool.mypy] passed the audit while
pyright in standard mode failed it. Per the maintainer's answer, each
CI checker runs strict: pyright strict mode or mypy strict = true.
The python-codestyle skill still made mypy conditional on a need and
kept a repo with none pyright-only. Reword it to allow mypy strict as
a build repo's only CI checker, matching #1941's decision.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
README.md, the python-codestyle skill's baseline paragraph, and
code-style.md still offered mypy in CI with no strictness, so a reader
following them configured what python.pyright.config now scores as
drift. Name mypy's strict flags there rather than strict = true, since
that key is global and a test tree is relaxed flag by flag.
The skill also called a mypy-only repo inherently consistent, which
holds only for pyright-only, where the editor and CI run one engine.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
"pyright strict, mypy strict, or both" sat at the end of a four-item
list, so "both" had no clear pair. Name it as the CI type-checker
choice.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
A few updated documentation passages are now internally inconsistent about mypy-only CI configurations and strictness terminology, which can mislead readers.
This pull request updates the fleet spec and documentation to explicitly allow a build-profile Python directory to run mypy as its only CI type checker, and clarifies that whichever type checker runs in CI must run in strict mode.
Changes:
Relax python.mypy.allowed to permit mypy as the only CI checker for build-profile Python directories, and update python.pyright.config to describe pyright strict / mypy strict / both as valid CI configurations.
Update Python codestyle skill docs and repo README to reflect the expanded CI type-checker options and strictness expectations.
Regenerate distributed skill copies and update the plugin source digest.
File
Description
spec/project-types.json
Updates spec assertions for build-profile type checking to allow pyright strict, mypy strict, or both.
README.md
Updates the Python project checklist line to include mypy strict and dual-checker options.
.github/skills/python-codestyle/SKILL.md
Regenerated distribution copy of python-codestyle with updated strictness/type-checker guidance.
Review of #2005 found "mypy strict" read as a single config knob on
the surfaces that name the CI checker, while the spec and code-style
say mypy's strict flags. Use that wording on every such surface.
The skill also said the editor and CI never disagree because Pylance
embeds pyright, which holds only where CI runs pyright.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
Some updated policy text still encodes pyright-specific assumptions (and omits mypy-only CI implications), which can leave the spec and guidance internally inconsistent for the newly supported configuration.
The python.config.placement assertion still calls out standalone pyrightconfig.json as drift, but it does not mention mypy's equivalent standalone config forms (mypy.ini/.mypy.ini or setup.cfg [mypy]). The CI validator explicitly recognizes those files as type-checker configuration sources for declared directories (.github/workflows/validate-task.yml:291-309), so the spec should name them here as well to keep the placement rule accurate when mypy is the only CI checker.
Review of #2005 read "mypy with its strict flags in CI and pyright
editor-only" as mypy being CI-only, while the skill runs mypy in CI and
the editor. Say both in README.md and profiles.md.
python.config.placement named pyrightconfig.json as drift but none of
mypy's standalone forms, which a mypy-only build directory now reaches.
Name mypy.ini, .mypy.ini, and a setup.cfg [mypy] section beside it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
AUDIT.md's python line still required pyright and named only
pyrightconfig.json as standalone drift, so an auditor following it
scored a mypy-only build directory as missing pyright and missed
mypy's standalone forms. Match python.pyright.config and
python.config.placement.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The previous wording demanded a strict checker of every Python
directory, while python.pyright.config, which carries the strictness
rule, is N/A for the lint-only profile.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Previously missed: Add mypy config file forms to placement rule (spec/project-types.json:43). The python.config.placement assertion still calls out standalone pyrightconfig.json as drift, but it does not mention mypy's equivalent standalone config forms (mypy.ini/.mypy.ini or setup.cfg [mypy]).
Fixed in be33d4b: python.config.placement now names mypy.ini, .mypy.ini, and a setup.cfg[mypy] section as drift beside pyrightconfig.json, and the Home Assistant exception is unchanged. a332967 adds the same list to AUDIT.md's python line and scopes its strictness demand to the build profile.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
Two updated documentation passages remain ambiguous/incorrect in the “or both” case by implying exactly one CI checker (“whichever runs in CI”) and should be reworded for clarity and correctness.
README.md and profiles.md offer pyright, mypy, or both, then said
"whichever runs in CI", which assumes exactly one. State what holds
for each checker CI runs instead.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟢 Approval recommended
The changes consistently align the spec and documentation with the intended contract (mypy-only strict CI allowed for build profile) without introducing behavioral code changes or inconsistencies.
…y Type Checker (#2006)
## Summary
Promotes develop to main, carrying
[#2005](#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](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.confignow 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.allowednow allows mypy as a build directory's only CI checker.python-codestyleskill (SKILL.md,references/profiles.md,references/code-style.md) andREADME.mdsay 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.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