Skip to content

pylint warning in Visual Studio Code: module 'dash_html_components' has no 'Div' member #285

@2-5

Description

@2-5

There are pylint warnings when using dash_core_components or dash_html_components objects. This makes working with dash in Visual Studio Code a bit annoying, since disabling those warnings is not the best thing either:

import dash_core_components as dcc
import dash_html_components as html

app.layout = html.Div(children=[
    dcc.Graph()
])

The warnings:

[pylint] E1101:Module 'dash_html_components' has no 'Div' member
[pylint] E1101:Module 'dash_core_components' has no 'Graph' member

2018-07-11_002424

The cause is probably this piece of magic which imports the names, which pylint can't handle:

for component in _components:
    setattr(_this_module, component.__name__, component)
    setattr(component, '_js_dist', _js_dist)
    setattr(component, '_css_dist', _css_dist)

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