Remove env.get
logic from defaults
#1289
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After some local tests, it turns out these never worked in practice. They seemed to work, as the vast majority had simple fallbacks that were able to function identically. However,
use_hot_reload
tried to use logic from another container entirely; because that value always defaulted totemplate_debug
, the conditional always passed &use_hot_reload
was always enabled if no commandline value was specifiedThe majority of changes in this PR are removing the
env.get
logic outright, as every other case can substitute the previous fallback value as the default & the end result is functionally identical.use_hot_reload
now has a default value ofNone
, meaning it doesn't add any environment option; as such, an explicit assignment is handled before the very first use-case. This was achieved by porting over the expected logic of the previous default valueThe only other change was adjusting the
compiledb
environment check from theenv.get
function to the dictionary equivalent. This is because I believe we should be usingenv.get
only in scenarios where a value might be null. Otherwise, the fallback value used is redundant, as an explicit bool is guaranteedEDIT: Fixes #1297