Skip to content

'No parent module' error #292

Open
Open
@dodomorandi

Description

@dodomorandi

I am having a strange issue with a false positive error.

I have a typical Python3 project with setup.py and the package directory, with all modules inside and, obviously, the __init__.py file.
Whenever I try to import a sibling module, in the form of from . import module, I got the error No parent module -- cannot perform relative import. If things are imported from the module in the form of from .module import func, everything is fine.
From the logs I can see that the error is obtained by pycodestyle. However, I tried to run the tool from the shell, and the error is not shown.

I am using NeoVim with LanguageClient-neovim, if it could be relevant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions