-
Notifications
You must be signed in to change notification settings - Fork 2.1k
load custom extensions in pre-hook #860
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
load custom extensions in pre-hook #860
Conversation
Current coverage is 100% (diff: 100%)@@ master #860 diff @@
====================================
Files 16 16
Lines 661 663 +2
Methods 0 0
Messages 0 0
Branches 0 0
====================================
+ Hits 661 663 +2
Misses 0 0
Partials 0 0
|
I have no idea where |
Hi @cheungnj! 👋 Thank you for resolving this issue. Great work! Don't worry too much about the code coverage. I don't really see a reason why your changes would cause I'm happy to merge this. Let's see what the others think. |
@@ -106,23 +105,25 @@ def run_script_with_context(script_path, cwd, context): | |||
mode='wb', | |||
suffix=extension | |||
) as temp: | |||
output = Template(contents).render(**context) | |||
template = env.from_string(contents) |
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.
Could we just instantiate StrictEnvironment
here, instead of passing the env through all these function calls?
Thank you @cheungnj! 🍪 |
Fixes #850
StrictEnvironment is used instead of Template when processing the pre-hook. I changed the hooks for the tests because strings weren't getting returned.