fleetlint Policy for a fleet of repositories
v0.5
Getting started

types/strict/python

The type checker runs in strict mode

Implements types/strict for python.

Severitywarning
Tiers1, 2
Stackspython
Scopeeach
Kindoutcome
Sourcelibrary v0.2.0
Selected byfleetlint-recommended@v0.2.0

Requirement

mypy runs with strict = true ([tool.mypy] in pyproject.toml, mypy.ini or setup.cfg) or pyright/basedpyright with typeCheckingMode strict (basedpyright also recommended or all; [tool.pyright], [tool.basedpyright] or pyrightconfig.json), in the project or a parent directory. Another type checker is added with accept:.

Why

Untyped Python with default checking is where generated code hides most bugs; only strict mode refuses the implicit Any.

Fix

Add [tool.mypy] with strict = true to pyproject.toml (fleetlint fix --apply appends it).

Agent instruction: Add [tool.mypy] strict = true to pyproject.toml (or set typeCheckingMode strict for pyright) and list the errors that appear instead of adding ignores.

fleetlint fix can apply this rule’s fix automatically (1 action(s)).

See: https://fleetlint.org/baseline/#static-analysis, https://fleetlint.org/stacks/#python


Generated by fleetlint docs from catalog v0.2.0.