Closed James4Ever0 closed 8 months ago
did you create the PR using an LLM? the code and comments in there surely look like that's the case...
You also don't explain when your code would actually be useful...
did you create the PR using an LLM? the code and comments in there surely look like that's the case...
You also don't explain when your code would actually be useful...
This code is half a year old and I do it for fixing this long standing error.
I want to explain but my memory is fuzzy. It is useful.
About your suspicion, I can tell that I had the feeling too. I am building a project named Cybergod, which can control mouse and keyboard and possibly do stuffs like browsing Github, making pull requests :)
The comment in the code is to indicate what were passed as *args
and **kwargs
at that location. I reason about the *args
are not so easy to be parsed, neither as the **kwargs
.
I decide to collect the info from *args
and **kwargs
as error message, and raise Exception
right after __init__
, not waiting for invocation, unlike StrictUndefined
.
See issue for slightly longer explanation. If you think this is generally useful to others, you can create an extension, but there's nothing requiring it to be in Jinja core.
This pull request is done by changing two files in the source code directory. It integrates the
NeverUndefined
class and make it usable by:This will raise exception for the following template, while
StrictUndefined
will not:Checklist:
CHANGES.rst
summarizing the change and linking to the issue... versionchanged::
entries in any relevant code docs.pre-commit
hooks and fix any issues.pytest
andtox
, no tests failed.