Skip to content

[python-types] pyproject.toml: disallow_untyped_defs = false allows all type gaps to silently pass #246

@realfishsam

Description

@realfishsam

File

sdks/python/pyproject.toml

Configuration Issue

  • Line 71: disallow_untyped_defs = false

mypy is configured but with disallow_untyped_defs = false, meaning every function missing a return type or parameter annotation silently passes CI. This is what allowed the 26+ type gaps in client.py, __init__.py, server_manager.py, and errors.py to accumulate undetected.

No .pyi Stub Files

No .pyi stub files exist anywhere under sdks/python/. Users consuming the SDK as a dependency from PyPI also get no stubs, so third-party type checkers cannot infer any types from the package.

Impact

  • All missing annotations catalogued in the companion [python-types] issues pass mypy today — CI gives a false green signal
  • Without stubs, downstream users running mypy or pyright on their own code get Unknown types for all pmxt return values

Suggested Fix

  1. Set disallow_untyped_defs = true in [tool.mypy]
  2. Fix the resulting mypy errors (tracked in companion issues)
  3. Optionally add py.typed marker file and generate .pyi stubs via stubgen to support downstream type checkers
[tool.mypy]
disallow_untyped_defs = true

Found by automated Python type hints audit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions