Skip to content

LGTM.com - false positive - py/import-own-module #2771

@davfsa

Description

@davfsa

Description of the false positive

From yesterday to today (code wasnt edited) LGTM started giving errors of import own module on __init__.py files

Code to reproduce

Project tree

pkg/
  __init__.py
  foo.py
  bar.py

foo.py

class Foo:
    pass

__init__.py

from pkg.foo import Foo # Error would be given on this line

URL to the alert on the project page on LGTM.com

An example of this can be found here: https://lgtm.com/projects/gl/nekokatt/hikari/snapshot/d58690b44effc0473138015613d32df93d352875/files/hikari/__init__.py?sort=name&dir=ASC&mode=heatmap#xd7e23e37c8aecf57:1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions