Skip to content

False positive: import-error and no-name-in-module when importing from python-docx #9426

@Willrholmes

Description

@Willrholmes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs triage 📥Just created, needs acknowledgment, triage, and proper labelling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions