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

Lazy loading makes working with MNE-Python scripts in VS Code very awkward #12048

Closed
hoechenberger opened this issue Oct 2, 2023 · 3 comments

Comments

@hoechenberger
Copy link
Member

Hello, I'm using VS Code with Pylance, and since lazy loading was introduced, using MNE is no fun at all anymore. It appears that Pylance doesn't know about any of those "lazy" imports, providing a subpar development experience:

Screenshot 2023-10-02 at 13 49 07

Pylance is the default Python type & syntax checker in VS Code, which also provides completion suggestions etc.

A workaround could be to distribute (type) stubs via typeshed, which is what TensorFlow does to deal with this exact same problem.

@hoechenberger
Copy link
Member Author

Potential alternative approach:
microsoft/pylance-release#474 (comment)

@larsoner
Copy link
Member

larsoner commented Oct 2, 2023

Closing as a dup of #12047 since I am pretty sure it will solve this problem (but we should definitely reopen this if it doesn't)

@larsoner larsoner closed this as completed Oct 2, 2023
@hoechenberger
Copy link
Member Author

Thanks @larsoner, I didn't realize you'd just opened this issue :)

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