fermitools / declad

BSD 3-Clause "New" or "Revised" License
1 stars 2 forks source link

Custom imports fixes for #41, revisiting #12 #44

Closed marcmengel closed 1 month ago

marcmengel commented 1 month ago

Turns out, "import custom" will not throw if there is a "custom" directory in the PYTHONPATH, even if the init.py is missing; but you can check that custom.file is set to something and that raises if its there but a directory.

similarly, we check for the import of template_tags in the startup when we run so we can log and stub in a substitute. Still not sure why that didn't work at the outer scope, but it seems to work here...