Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing issue with solara component #950

Open
Ben-Epstein opened this issue Dec 23, 2024 · 3 comments
Open

Typing issue with solara component #950

Ben-Epstein opened this issue Dec 23, 2024 · 3 comments
Assignees
Milestone

Comments

@Ben-Epstein
Copy link
Contributor

Ben-Epstein commented Dec 23, 2024

Expected Behavior

solara.component resolves and has proper autocomplete

Current Behavior

Typing and autocomplete cannot find solara.component

image

image

Steps to Reproduce the Problem

import solara, try to use component (vscode)

Specifications

  • Solara Version: 1.43.0
  • Platform: MacOS with vscode
  • Affected Python Versions: 3.10

Note that my code runs, component is available, it's just a typing/autocomplete issue

@Ben-Epstein
Copy link
Contributor Author

I see it imported here, https://github.com/widgetti/solara/blob/master/solara/__init__.py#L44 but you aren't exporting the available modules with __all__ = [...] -- perhaps that is why?

@iisakkirotko
Copy link
Collaborator

I think you're correct, we have some files that are missing and __all__ / explicit re-exports. I'm hoping to take a look at this before the 2.0 release, so hopefully we can include it in that.

Related: #465

@iisakkirotko iisakkirotko self-assigned this Dec 23, 2024
@iisakkirotko iisakkirotko added this to the Solara 2.0 milestone Dec 23, 2024
@Ben-Epstein
Copy link
Contributor Author

Ben-Epstein commented Dec 23, 2024

Thanks @iisakkirotko -- i was coming back to report that the reportPrivateImportUsage from pyright/pylance is the complaining issue here, which confirms the __all__ theory. If you disable this error, you no longer get complaints. That's what i've done for now

"python.analysis.diagnosticSeverityOverrides": {
        "reportPrivateImportUsage": "none"
    }

iisakkirotko added a commit that referenced this issue Dec 23, 2024
Helps typing and linting tools know the structure of the package.
Fixes #950
Fixes #465
iisakkirotko added a commit that referenced this issue Dec 27, 2024
Helps typing and linting tools know the structure of the package.
Fixes #950
Fixes #465
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants