-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
gh-113317: Don't use global clinic instance in bad_argument() #114330
gh-113317: Don't use global clinic instance in bad_argument() #114330
Conversation
Make it possible for a converter to have multiple includes, make the 'includes' an instance attribute. This implies converter includes are added during template generation, so we have to add them to the clinic instance at the end of the template generation instead of in the beginning.
Competing PR to #114324 😎⚔️ |
Post this, the global clinic instance is only used by warn/fail. Poke, poke Argument-Clinic#35. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks for the review, Victor. I'll wait a bit for Alex to chime in before landing. |
I'm going to land this tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks! Sorry for the delay!
Thanks, both! |
One less usage of globals! |
…ython#114330) Make it possible for a converter to have multiple includes, by collecting them in a list on the converter instance. This implies converter includes are added during template generation, so we have to add them to the clinic instance at the end of the template generation instead of in the beginning.
…ython#114330) Make it possible for a converter to have multiple includes, by collecting them in a list on the converter instance. This implies converter includes are added during template generation, so we have to add them to the clinic instance at the end of the template generation instead of in the beginning.
Make it possible for a converter to have multiple includes.
Also make the 'includes' an instance attribute. This implies
some converter includes are added to the converters during
template generation (parse_arg()), so we have to query the
converters about their includes at the end of the template
generation.