Skip to content
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

Review if uptodatefunc returning True is correct #4

Closed
simonw opened this issue Oct 12, 2022 · 1 comment
Closed

Review if uptodatefunc returning True is correct #4

simonw opened this issue Oct 12, 2022 · 1 comment

Comments

@simonw
Copy link
Owner

simonw commented Oct 12, 2022

This code here:

def load_func(path):
try:
code = datasette._edit_templates[path]
return code, path, lambda: True

https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.FunctionLoader says:

The uptodatefunc is a function that is called if autoreload is enabled and has to return True if the template is still up to date. For more details have a look at BaseLoader.get_source() which has the same return value.

So is always returning True here the right thing to do?

@simonw
Copy link
Owner Author

simonw commented Jan 15, 2024

I think this is OK.

@simonw simonw closed this as completed Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant