Track 2: Add PEP 561 py.typed marker
Overview
PEP 561 requires packages that ship inline type annotations to include an empty
py.typed marker file. Without it, mypy and pyright will ignore the package's
type annotations when used as a dependency.
Goal
Add py.typed to the package so downstream consumers get full type checking
support.
Implementation Steps
- Create an empty file at
src/itl_policy_builder/py.typed
- Add
py.typed to package-data / include in pyproject.toml so it is
shipped in the sdist/wheel
pyproject.toml change
In the [tool.setuptools.package-data] (or equivalent) section:
[tool.setuptools.package-data]
itl_policy_builder = ["py.typed"]
Acceptance Criteria
Track 2: Add PEP 561 py.typed marker
Overview
PEP 561 requires packages that ship inline type annotations to include an empty
py.typedmarker file. Without it, mypy and pyright will ignore the package'stype annotations when used as a dependency.
Goal
Add
py.typedto the package so downstream consumers get full type checkingsupport.
Implementation Steps
src/itl_policy_builder/py.typedpy.typedtopackage-data/includeinpyproject.tomlso it isshipped in the sdist/wheel
pyproject.toml change
In the
[tool.setuptools.package-data](or equivalent) section:Acceptance Criteria
src/itl_policy_builder/py.typedfile exists (empty)py.typedincluded in the built wheel (python -m buildthenunzip -l dist/*.whl)mypy --stricton a consumer package resolves types from this package without errors