-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
great writeupA wonderful example of a quality contribution 💜A wonderful example of a quality contribution 💜resolverRelated to the package resolverRelated to the package resolver
Description
I've noticed that when installing packages that contain type hints, those hints don't get installed.
For example take https://github.com/hynek/svcs
If I install the dev dependencies using uv pip install --reinstall --editable .[dev] I get Mypy and FastAPI installed.
But, if I run mypy tests/typing/fastapi.py, I get:
tests/typing/fastapi.py:12: error: Skipping analyzing "fastapi": module is installed, but missing library stubs or py.typed marker [import-untyped]
tests/typing/fastapi.py:13: error: Skipping analyzing "fastapi.responses": module is installed, but missing library stubs or py.typed marker [import-untyped]
tests/typing/fastapi.py:13: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
tests/typing/fastapi.py:60: error: Untyped decorator makes function "view" untyped [misc]
tests/typing/fastapi.py:69: error: Untyped decorator makes function "view2" untyped [misc]
Found 4 errors in 1 file (checked 1 source file)
Running pip install --force-reinstall fastapi fixes it:
Success: no issues found in 1 source file
Between the installations, I can observe how $VIRTUAL_ENV/lib/python3.12/site-packages/fastapi/py.typed is missing and appears after installing it using pip. If I reinstall using uv, it vanishes again.
❯ uv --version
uv 0.1.3
❯ python -m platform
macOS-14.3.1-arm64-arm-64bitReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
great writeupA wonderful example of a quality contribution 💜A wonderful example of a quality contribution 💜resolverRelated to the package resolverRelated to the package resolver