Skip to content

v6.1.0 breaks Pylance highlighting and produces errors #5186

Description

@IlanCosman

Code:

import plotly.graph_objects as go

fig = go.Figure(
    data=go.Scatter(x=[1, 2, 3], y=[4, 5, 6], mode="lines+markers", name="My Line"),
    layout=go.Layout(
        title=go.layout.Title(text="My Line Chart"),
    ),
)

Expected highlighting / lack of errors (from v6.0.1):

Image

Broken highlight with errors (from v6.1.0):

Image

The error is:

Cannot access attribute "Title" for class "type[FigureWidget]"
  Attribute "Title" is unknownPylance[reportAttributeAccessIssue]

The code of course still runs just fine. I'm using the latest version of VSCode and Pylance at time of writing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1needed for current cyclebugsomething broken

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions