Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mypy reports error: Skipping analyzing "fxpmath": module is installed, but missing library stubs or py.typed marker #94

Open
jtmoon79 opened this issue Feb 14, 2024 · 0 comments

Comments

@jtmoon79
Copy link

jtmoon79 commented Feb 14, 2024

tl;dr mypy reports error when reviewing a file with import fxpmath:
error: Skipping analyzing "fxpmath": module is installed, but missing library stubs or py.typed marker [import-untyped]

Problem

Running mypy against a Python file that imports fxpmath fails with error

PS> mypy .\testA.py
testA.py:1: error: Skipping analyzing "fxpmath": module is installed, but missing library stubs or py.typed marker  [import-untyped]
testA.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

Reproduction

Using Python 3.8.10

Create a simple Python file testA.py

import fxpmath


if __name__ == "__main__":
    print(str(dir(fxpmath)))

Run mypy against the simple Python file testA.py. Use a virtual environment.

PS> python -m virtualenv --copies .virtualenv
PS> .\.virtualenv\Scripts\activate.ps1
PS> pip install fxpmath mypy
PS> mypy .\testA.py
testA.py:1: error: Skipping analyzing "fxpmath": module is installed, but missing library stubs or py.typed marker  [import-untyped]
testA.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports 

This installed fxpmath version 0.4.9, mypy version 1.8.0.

This bug was tested on Windows 10. This bug should occur on every Python platform.

Solution

One of:

  • Provide py.typed markers in fxpmath as suggested by mypy
  • Provide a types-fxpmath types stub package (similar to, for example, types-setuptools).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant