-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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: AC converter: Use add_include() in bad_argument() #114324
Conversation
Ah, my simple CConverter.add_include() implementation reached its limits:
|
Yeah, I suspected that :) Well, it should be straight forward to support multiple includes in converters; we could extract the nice "condition" logic you added for |
Also, I think the |
* Rename the 'clinic' global variable to 'global_clinic'. * Make CConverter.add_include() smarter. Don't fail when adding exactly the same include twice. * Copy converters includes later in output_templates().
b151101
to
5dff970
Compare
Sorry, I should have run tests locally, or mark this PR as a draft. I didn't expect so many back and forth. All issues should now be fixed (let's see what the CI says). |
# added late | ||
for converter in converters: | ||
include = converter.include | ||
if include is not None: |
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.
I think that can be made an assert.
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.
Not all converters need a special include. Do you mean that include
variable is never None?
commit e14930f was merged instead, I close my PR. |
Rename also the 'clinic' global variable to 'global_clinic'.