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
The (present-but-empty) `py.typed` file indicates to mypy (and presumably other type checkers) that this module supports type annotations.
The problem: I have [a repo](https://github.com/viam-modules/re-id-object-tracking) which imports this SDK, but running `mypy main.py` on it gives a bunch of errors like this:
```
src/config/attribute.py:3: error: Skipping analyzing "viam.proto.app.robot": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/config/config.py:1: error: Skipping analyzing "viam.proto.app.robot": module is installed, but missing library stubs or py.typed marker [import-untyped]
```
These errors occur despite all the type annotations in the SDK.
The solution: in my virtual environment, I ran `touch venv/lib/python3.12/site-packages/viam/py.typed`, and all those errors went away. This works because of [PEP561](https://peps.python.org/pep-0561/), which says "Package maintainers who wish to support type checking of their code MUST add a marker file named `py.typed` to their package"
This PR hopefully does the same thing to the official version. However, I'm unsure how to test this out.
0 commit comments