reduce calls to stencila_manifest_contexts
@@ -557,8 +557,7 @@ class BaseImage(BuildPack):
except FileNotFoundError:
pass
if self.stencila_manifest_contexts:
- for context in self.stencila_manifest_contexts:
- if(context == 'py' or context == 'pyjp'):
+ if {'py', 'pyjp'}.intersection(self.stencila_manifest_contexts):
assemble_scripts.extend(
[
(
@@ -570,7 +569,7 @@ class BaseImage(BuildPack):
)
]
)
- #elif(context == 'r'):
+ #if {'r'}.intersection(self.stencila_manifest_contexts):
# handled in RBuildPack
if self.stencila_manifest_dir:
assemble_scripts.extend(
