summaryrefslogtreecommitdiff
path: root/mako/runtime.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2021-10-25 19:30:25 +0000
committerGerrit Code Review <gerrit@ci3.zzzcomputing.com>2021-10-25 19:30:25 +0000
commita6c37d64d434c84c853ce2a297bd8b2363b4e374 (patch)
tree0229ce673dd35e4e03de18a95512e8ad60d917af /mako/runtime.py
parenteacf04b14d8a8f6aa6a8a0af2847558f98fd44b1 (diff)
parentc47d172e5c6524c37ec91e5304c8279cc0132e54 (diff)
downloadmako-a6c37d64d434c84c853ce2a297bd8b2363b4e374.tar.gz
Merge "Refactoring Code" into main
Diffstat (limited to 'mako/runtime.py')
-rw-r--r--mako/runtime.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/mako/runtime.py b/mako/runtime.py
index f9ce630..28186a9 100644
--- a/mako/runtime.py
+++ b/mako/runtime.py
@@ -482,15 +482,14 @@ class Namespace:
key = (self, uri)
if key in self.context.namespaces:
return self.context.namespaces[key]
- else:
- ns = TemplateNamespace(
- uri,
- self.context._copy(),
- templateuri=uri,
- calling_uri=self._templateuri,
- )
- self.context.namespaces[key] = ns
- return ns
+ ns = TemplateNamespace(
+ uri,
+ self.context._copy(),
+ templateuri=uri,
+ calling_uri=self._templateuri,
+ )
+ self.context.namespaces[key] = ns
+ return ns
def get_template(self, uri):
"""Return a :class:`.Template` from the given ``uri``.