# HG changeset patch # User Vincent Hatakeyama <vincent.hatakeyama@xcg-consulting.fr> # Date 1534755681 -7200 # Mon Aug 20 11:01:21 2018 +0200 # Node ID 10c92ce69e2fcc8c63890ade90b0c1485425cb2c # Parent 7c7994ffc45eed1801480cc8fe2be18fd4b2e144 :pencil: running dockerized isort diff --git a/docker_dev_start.py b/docker_dev_start.py --- a/docker_dev_start.py +++ b/docker_dev_start.py @@ -32,9 +32,9 @@ _logger = logging.getLogger(__name__) -__version__ = '1.1.4' +__version__ = '1.1.5' __date__ = '2017-08-11' -__updated__ = '2018-07-31' +__updated__ = '2018-08-20' def which(program): @@ -69,14 +69,13 @@ def isort(): - """Run isort if found + """Run isort """ - if which('isort'): - _logger.info('Running isort') - call(['isort', '-c']) - else: - _logger.warning('No isort in PATH') - + _logger.info('Running isort') + call([ + 'docker', 'run', '--rm', '--volume', + '{}:/mnt'.format(os.environ['PWD']), 'xcgd/isort', + 'sh', '-c', 'cd /mnt && isort -c']) def main(argv=None): # IGNORE:C0111 """Parse arguments and launch conversion