Skip to content

pyright complain "component" is not exported from module "solara" #465

@zhuoqiang

Description

@zhuoqiang

pyright complains "component" is not exported from module "solara" for the following code, line 3

import solara

@solara.component
class Page
    pass

turns out it is not a false alarm, see microsoft/pyright#5929

By default, all imports in a py.typed library are considered private unless they are explicitly re-exported. To indicate that an imported symbol is intended to be re-exported, the maintainers of this library would need to use one of the techniques documented here

so I guess instead of

from reacton import component

it could be updated to re-exported using the redundant form to make pyright happy

from reacton import component as component

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