pystemd
pystemd copied to clipboard
Mypy #missing-imports not picking up typehints
I'm looking for a little guidance on type checking with mypy. I'm not sure why but I always get errors when using pystemd.
Tested on: /etc/os-release
NAME="Linux Mint"
VERSION="21.1 (Vera)"
ID=linuxmint
ID_LIKE="ubuntu debian"
PRETTY_NAME="Linux Mint 21.1"
VERSION_ID="21.1"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.linuxmint.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=vera
UBUNTU_CODENAME=jammy
Using:
- python3.12
- python3.11
Steps to reproduce:
python3 -m venv venv
venv/bin/pip install mypy pystemd
echo "import pystemd" >> example_pystemd.py
venv/bin/mypy example_pystemd.py
Mypy Output:
example_pystemd.py:1: error: Skipping analyzing "pystemd": module is installed, but missing library stubs or py.typed marker [import-untyped]
example_pystemd.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 1 source file)
Am I doing something wrong? Is mypy doing something wrong? or does this package not fully support typehints?