fix(typecheck): align pyrightconfig.json typeCheckingMode with pyproject.toml strict setting #10704

Open
opened 2026-04-19 06:50:31 +00:00 by HAL9000 · 0 comments
Owner

Summary

There is a discrepancy between the two Pyright configuration files. pyrightconfig.json uses "typeCheckingMode": "standard" while pyproject.toml uses typeCheckingMode = "strict". Since nox -s typecheck runs pyright without arguments (which reads pyrightconfig.json), CI is running standard mode type checking — NOT strict mode as documented.

Problem

pyrightconfig.json (used by nox -s typecheck and IDE):

{
  "typeCheckingMode": "standard",
  ...
}

pyproject.toml (intended configuration):

[tool.pyright]
typeCheckingMode = "strict"
strictListInference = true
strictDictionaryInference = true
strictSetInference = true

The nox -s typecheck session runs:

session.run("pyright", stderr=sys.stdout)

Pyright reads pyrightconfig.json first when no config file is specified. This means:

  • CI is running standard mode type checking
  • CONTRIBUTING.md documents "Pyright strict type checking"
  • The strict settings in pyproject.toml are being ignored

Impact

  • Type errors that would be caught in strict mode are silently passing
  • The project's stated quality bar ("Pyright strict mode") is not being enforced
  • Developers using IDE integration (via pyrightconfig.json) get different results than CI

Solution

Update pyrightconfig.json to use "typeCheckingMode": "strict" to match pyproject.toml.

Note: pyrightconfig.json also has "venvPath": ".nox" and "venv": "typecheck" for IDE integration. These should be preserved.

Subtasks

  • Update pyrightconfig.json to use "typeCheckingMode": "strict"
  • Run nox -s typecheck to verify it passes with strict mode
  • Fix any new type errors surfaced by strict mode
  • Verify IDE integration still works correctly

Definition of Done

  • pyrightconfig.json uses "typeCheckingMode": "strict"
  • nox -s typecheck passes with no errors
  • No regression in type checking

Metadata

  • Branch: fix/pyrightconfig-strict-mode
  • Commit Message: fix(typecheck): align pyrightconfig.json typeCheckingMode with pyproject.toml strict setting

Duplicate Check

Searched open and closed issues for: "pyrightconfig", "typeCheckingMode", "strict mode", "pyright standard". No duplicates found.


Automated by CleverAgents Bot
Supervisor: Implementation Pool | Agent: implementation-worker

## Summary There is a discrepancy between the two Pyright configuration files. `pyrightconfig.json` uses `"typeCheckingMode": "standard"` while `pyproject.toml` uses `typeCheckingMode = "strict"`. Since `nox -s typecheck` runs `pyright` without arguments (which reads `pyrightconfig.json`), CI is running standard mode type checking — NOT strict mode as documented. ## Problem **`pyrightconfig.json`** (used by `nox -s typecheck` and IDE): ```json { "typeCheckingMode": "standard", ... } ``` **`pyproject.toml`** (intended configuration): ```toml [tool.pyright] typeCheckingMode = "strict" strictListInference = true strictDictionaryInference = true strictSetInference = true ``` The `nox -s typecheck` session runs: ```python session.run("pyright", stderr=sys.stdout) ``` Pyright reads `pyrightconfig.json` first when no config file is specified. This means: - CI is running **standard** mode type checking - CONTRIBUTING.md documents "Pyright strict type checking" - The strict settings in `pyproject.toml` are being ignored ## Impact - Type errors that would be caught in strict mode are silently passing - The project's stated quality bar ("Pyright strict mode") is not being enforced - Developers using IDE integration (via `pyrightconfig.json`) get different results than CI ## Solution Update `pyrightconfig.json` to use `"typeCheckingMode": "strict"` to match `pyproject.toml`. Note: `pyrightconfig.json` also has `"venvPath": ".nox"` and `"venv": "typecheck"` for IDE integration. These should be preserved. ## Subtasks - [ ] Update `pyrightconfig.json` to use `"typeCheckingMode": "strict"` - [ ] Run `nox -s typecheck` to verify it passes with strict mode - [ ] Fix any new type errors surfaced by strict mode - [ ] Verify IDE integration still works correctly ## Definition of Done - `pyrightconfig.json` uses `"typeCheckingMode": "strict"` - `nox -s typecheck` passes with no errors - No regression in type checking ## Metadata - **Branch:** `fix/pyrightconfig-strict-mode` - **Commit Message:** `fix(typecheck): align pyrightconfig.json typeCheckingMode with pyproject.toml strict setting` ## Duplicate Check Searched open and closed issues for: "pyrightconfig", "typeCheckingMode", "strict mode", "pyright standard". No duplicates found. --- **Automated by CleverAgents Bot** Supervisor: Implementation Pool | Agent: implementation-worker
HAL9000 added this to the v3.9.0 milestone 2026-04-19 06:50:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#10704
No description provided.