-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix errors caused in jinja StrictUndefined mode #2571
Changes from all commits
5a4a6a7
6e5b16c
4884a37
19de39c
733fb6e
84be32e
9d97757
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
|
||
from admin import app | ||
from admin.data import build_sample_db | ||
from jinja2 import StrictUndefined | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not the optimal import sorting, given that "admin" is a local folder, but ruff does not know that. I could use "." to make it clearer, or we could just be okay with it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am personally fine with it. If someone was so inclined, we could probably add some ruff config that would help it sort "correctly" - but I consider it broadly unimportant given the small scope, as you note. |
||
|
||
# Build a sample db on the fly, if one does not exist yet. | ||
app_dir = op.join(op.realpath(os.path.dirname(__file__)), "admin") | ||
|
@@ -13,4 +14,5 @@ | |
|
||
if __name__ == "__main__": | ||
# Start app | ||
app.jinja_env.undefined = StrictUndefined | ||
app.run(debug=True) |
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 wasn't sure if 1) this change warranted an entry,
2) this was the correct version header
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.
This looks great - that'll be the next version, so perfect :)