pylint
pylint copied to clipboard
False positive: import-error and no-name-in-module when importing from python-docx
Bug description
docx.api import Document
Configuration
[MAIN]
jobs=0
disable=raw-checker-failed,
locally-disabled,
file-ignored,
suppressed-message,
deprecated-pragma,
missing-function-docstring,
missing-class-docstring,
missing-module-docstring,
too-few-public-methods,
line-too-long,
no-else-return,
protected-access,
fixme,
wrong-import-order,
duplicate-code
Command used
pylint ${SRC_HOME} ${TEST_HOME} type_stubs
Pylint output
E0401: Unable to import 'docx.api' (import-error)
E0611: No name 'api' in module 'docx' (no-name-in-module)
E0401: Unable to import 'docx.document' (import-error)
E0611: No name 'document' in module 'docx' (no-name-in-module)
### Expected behavior
No error
### Pylint version
```shell
pylint 3.0.3
asteroid 3.0.3
Python 3.12.1
OS / Environment
macOS 14.2.1
Additional dependencies
python-docs==0.8.11
This command works for me in VS Code: ctr p: >pylint: Restart Server.
It's possible #9428 will help. Please retest once pylint 3.1is out. Thanks!