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
mypy error: Skipping analyzing "permit": module is installed, but missing library stubs or py.typed marker [import-untyped] #116
When using mypy to type check Python code that uses the permit library, I see the following error:
$ mypy .
mymodule.py:9: error: Skipping analyzing "permit": module is installed, but missing library stubs or py.typed marker [import-untyped]
mymodule.py:9: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 10 source files)
error: Recipe `types` failed on line 58 with exit code 1
If you would like to publish a library package to a package repository yourself (e.g. on PyPI) for either internal or external use in type checking, packages that supply type information via type comments or annotations in the code should put a py.typed file in their package directory.
Hi! I'd like to work on this issue. I've looked into it and the fix is straightforward: adding a py.typed file to the package and updating the package_data in setup.py. Can I be assigned to this issue?
Thanks @coactive-jeffrey for the report, and thanks @Tarcio0211 for #125. This is fixed on main in #126 and ships in permit 3.0.0. The package now includes a PEP 561 py.typed marker, so mypy analyzes permit instead of skipping it with import-untyped.
We didn't ship the marker on its own: that would have turned one import error into many false errors on valid code, because the generated models used positional Field defaults, the sync client was typed as coroutines, and methods that accept dicts were annotated as model-only. #126 fixes all three, types the SDK models as the pydantic v1 models they are at runtime on both pydantic majors, and adds a CI check that runs mypy --strict on a sample consumer and requires zero errors.
Once you're on 3.0.0, you can drop any ignore_missing_imports / # type: ignore[import-untyped] you added for permit. Please reopen if anything still looks off with your checker.
Activity
danyi1212 commentedon Apr 29, 2025
Hey @coactive-jeffrey, thank you for reporting that!
Thank you for reporting that, I'll take try it out and keep you posted about it 🌟
Tarcio0211 commentedon Aug 15, 2026
Hi! I'd like to work on this issue. I've looked into it and the fix is straightforward: adding a py.typed file to the package and updating the package_data in setup.py. Can I be assigned to this issue?
Add py.typed marker for PEP 561 support (permitio#116)
linear-code commentedon Aug 23, 2026
PER-15773
zeevmoney commentedon Sep 28, 2026
Thanks @coactive-jeffrey for the report, and thanks @Tarcio0211 for #125. This is fixed on main in #126 and ships in permit 3.0.0. The package now includes a PEP 561
py.typedmarker, so mypy analyzespermitinstead of skipping it withimport-untyped.We didn't ship the marker on its own: that would have turned one import error into many false errors on valid code, because the generated models used positional
Fielddefaults, the sync client was typed as coroutines, and methods that accept dicts were annotated as model-only. #126 fixes all three, types the SDK models as the pydantic v1 models they are at runtime on both pydantic majors, and adds a CI check that runsmypy --stricton a sample consumer and requires zero errors.Once you're on 3.0.0, you can drop any
ignore_missing_imports/# type: ignore[import-untyped]you added for permit. Please reopen if anything still looks off with your checker.