Skip to content

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented Oct 8, 2025

We have a nice error for this case, but refactoring lost it. This makes sure the interpreter is initialized before we try to read the global config so the variable isn't empty.

We have a nice error for this case, but refactoring lost it. This makes sure the interpreter is initialized before we try to read the global config so the variable isn't empty.
ipython_helper()
start = monotonic()
global _config
interpreter = get_interpreter()
Copy link
Member

Choose a reason for hiding this comment

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

I think this is the online line (besides init and get_interpreter() itself) that tries to access this global directy like this... which feels like a risky pattern I'd rather not perpetuate. I wonder if instead get_interpreter() should return the config, and we always access it through that call to ensure it's initialized?

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

Successfully merging this pull request may close these issues.

2 participants