From b032a7cd278c96b7aa29c001cb2e3a9c47cdbbb2 Mon Sep 17 00:00:00 2001 From: nuest Date: Mon, 5 Nov 2018 18:51:10 +0100 Subject: [PATCH] safe one if clause (intersection is already false-y) --- repo2docker/buildpacks/base.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/repo2docker/buildpacks/base.py b/repo2docker/buildpacks/base.py index 6c31e9d6..8e1c04f9 100644 --- a/repo2docker/buildpacks/base.py +++ b/repo2docker/buildpacks/base.py @@ -554,19 +554,18 @@ class BaseImage(BuildPack): )) except FileNotFoundError: pass - if self.stencila_contexts: - if {'py', 'pyjp'}.intersection(self.stencila_contexts): - assemble_scripts.extend( - [ - ( - "${NB_USER}", - r""" - ${KERNEL_PYTHON_PREFIX}/bin/pip install --no-cache https://github.com/stencila/py/archive/f1260796.tar.gz && \ - ${KERNEL_PYTHON_PREFIX}/bin/python -m stencila register - """, - ) - ] - ) + if {'py', 'pyjp'}.intersection(self.stencila_contexts): + assemble_scripts.extend( + [ + ( + "${NB_USER}", + r""" + ${KERNEL_PYTHON_PREFIX}/bin/pip install --no-cache https://github.com/stencila/py/archive/f1260796.tar.gz && \ + ${KERNEL_PYTHON_PREFIX}/bin/python -m stencila register + """, + ) + ] + ) if self.stencila_manifest_dir: assemble_scripts.extend( [