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

[Jupyter] "display" is not defined #1090

Closed
steovd opened this issue Feb 18, 2025 · 0 comments · Fixed by #1098
Closed

[Jupyter] "display" is not defined #1090

steovd opened this issue Feb 18, 2025 · 0 comments · Fixed by #1098
Labels
jupyter notebooks pylance parity feature that exists in pylance but not pyright / bug specific to our impl of a pylance feature

Comments

@steovd
Copy link

steovd commented Feb 18, 2025

Description

Basedpyright doesn't account for IPython automatically importing display() and flags its use with reportUndefinedVariable. It can be worked around by importing it explicitly, but not having to do so would be nice.

Since IPython 5.4 and 6.1 display() is automatically made available to the user without import. If you are using display in a document that might be used in a pure python context or with older version of IPython, use the following import at the top of your file:

from IPython.display import display

-- https://ipython.readthedocs.io/en/stable/api/generated/IPython.display.html#IPython.display.display

@DetachHead DetachHead added needs investigation awaiting verification by a maintainer that the issue is valid jupyter notebooks pylance parity feature that exists in pylance but not pyright / bug specific to our impl of a pylance feature and removed needs investigation awaiting verification by a maintainer that the issue is valid labels Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jupyter notebooks pylance parity feature that exists in pylance but not pyright / bug specific to our impl of a pylance feature
Projects
None yet
2 participants