Skip to content

Commit

Permalink
Simplify cook check
Browse files Browse the repository at this point in the history
  • Loading branch information
malthe committed Jan 17, 2024
1 parent 43b59bb commit 56fcf4b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/chameleon/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,7 @@ def _cook(
) -> dict[str, Any]:

filename = self._get_module_name(name)
cooked = self.loader.get(filename)
if cooked is None or DEBUG_MODE:
if DEBUG_MODE or (cooked := self.loader.get(filename)) is None:
try:
source = self._compile(body, builtins)
if self.debug:
Expand Down

0 comments on commit 56fcf4b

Please sign in to comment.