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
Mypy does not seem to resolve modules that consist of single-file .pyi files that sit directly in site-packages.
For example, the project pyodbc compiles to a single compiled module file, and its accompanying stub file sits with it in site-packages. However, mypy does not recognize this lone .pyi file and instead throws 'Cannot find implementation or library stub for module named "pyodbc" [import-not-found]'.
I expect mypy to recognize the module in the same way Python does.
Actual Behavior
<string>:1: error: Cannot find implementation or library stub for module named "pyodbc" [import-not-found]
<string>:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 1 source file)
Your Environment
Mypy version used: 1.8.0
Mypy command-line flags: none
Mypy configuration options from mypy.ini (and other config files): none
This mocks out a module for mgr_module.py to 'import' during mypy
type analysis. Previously the ceph_module.pyi was enough for this to
work, but I guess something in the tooling changed.
I cannot figure out why this ever worked before, and why it doesn't
now.
Maybe related to python/mypy#16987 ?
bazaah
added a commit
to bazaah/aur-ceph
that referenced
this issue
Mar 18, 2024
This mocks out a module for mgr_module.py to 'import' during mypy
type analysis. Previously the ceph_module.pyi was enough for this to
work, but I guess something in the tooling changed.
I cannot figure out why this ever worked before, and why it doesn't
now.
Maybe related to python/mypy#16987 ?
bazaah
added a commit
to bazaah/aur-ceph
that referenced
this issue
Mar 23, 2024
This mocks out a module for mgr_module.py to 'import' during mypy
type analysis. Previously the ceph_module.pyi was enough for this to
work, but I guess something in the tooling changed.
I cannot figure out why this ever worked before, and why it doesn't
now.
Maybe related to python/mypy#16987 ?
Bug Report
Mypy does not seem to resolve modules that consist of single-file .pyi files that sit directly in site-packages.
For example, the project pyodbc compiles to a single compiled module file, and its accompanying stub file sits with it in site-packages. However, mypy does not recognize this lone .pyi file and instead throws 'Cannot find implementation or library stub for module named "pyodbc" [import-not-found]'.
To Reproduce
Expected Behavior
I expect mypy to recognize the module in the same way Python does.
Actual Behavior
Your Environment
mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: