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

List all ipython builtins #8719

Merged
merged 1 commit into from
Nov 16, 2023
Merged

List all ipython builtins #8719

merged 1 commit into from
Nov 16, 2023

Conversation

konstin
Copy link
Member

@konstin konstin commented Nov 16, 2023

I checked for ipython-specific builtins on python 3.11 using

import json
from subprocess import check_output

builtins_python = json.loads(check_output(["python3", "-c" "import json; print(json.dumps(dir(__builtins__)))"]))
builtins_ipython = json.loads(check_output(["ipython3", "-c" "import json; print(json.dumps(dir(__builtins__)))"]))
print(sorted(set(builtins_ipython) - set(builtins_python)))

and updated the relevant constant and match. The list changes from

display

to

__IPYTHON__, display, get_ipython.

Followup to #8707

@konstin konstin added the linter Related to the linter label Nov 16, 2023
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@konstin konstin merged commit dda31b6 into main Nov 16, 2023
17 checks passed
@konstin konstin deleted the ipython-builtins-script branch November 16, 2023 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linter Related to the linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants