Kevin Sweeney created AURORA-780:
------------------------------------

             Summary: python checkstyle looks at 3rdparty
                 Key: AURORA-780
                 URL: https://issues.apache.org/jira/browse/AURORA-780
             Project: Aurora
          Issue Type: Bug
          Components: Build
            Reporter: Kevin Sweeney


When attempting to commit https://reviews.apache.org/r/25835/ I was blocked by 
Python checkstyle, as the rename of checked-in bootstrap test files (some 
written in python) was picked up.

{noformat}
T401:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:002
 From import must import names in lexical order.
     |from __future__ import absolute_import, unicode_literals, print_function, 
division

T401:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:005
 From import must import names in lexical order.
     |from os import environ, stat, remove as _delete_file

T401:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:006
 From import must import names in lexical order.
     |from os.path import isfile, dirname, basename, abspath

T405:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:004
 Import block starting here contains imports from multiple module types: stdlib 
3rdparty.
     |from sys import argv

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:018
 Indentation of 4 instead of 2
     |    BUCKET_NAME = environ['TWBS_S3_BUCKET']

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:020
 Indentation of 4 instead of 2
     |    raise SystemExit("TWBS_S3_BUCKET environment variable not set!")

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:024
 Indentation of 4 instead of 2
     |    hasher = sha256()

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:026
 Indentation of 4 instead of 2
     |        hasher.update(input_file.read())

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:033
 Indentation of 4 instead of 2
     |    try:

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:034
 Indentation of 4 instead of 2
     |        _delete_file(filename)

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:036
 Indentation of 4 instead of 2
     |        pass

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:040
 Indentation of 4 instead of 2
     |    kib = stat(_tarball_filename_for(directory)).st_size // BYTES_PER_MB

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:045
 Indentation of 4 instead of 2
     |    return abspath('./{}.tar.gz'.format(basename(directory)))

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:049
 Indentation of 4 instead of 2
     |    print("Creating tarball of {}...".format(directory))

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:054
 Indentation of 4 instead of 2
     |    print("Extracting tarball of {}...".format(directory))

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:059
 Indentation of 4 instead of 2
     |    _delete_file_quietly(NEED_TO_UPLOAD_MARKER)

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:061
 Indentation of 4 instead of 2
     |        print("Downloading {} tarball from S3...".format(friendly_name))

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:064
 Indentation of 4 instead of 2
     |        open(NEED_TO_UPLOAD_MARKER, 'a').close()

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:073
 Indentation of 4 instead of 2
     |    _create_tarball(directory)

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:084
 Indentation of 4 instead of 2
     |    argv.pop(0)

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:086
 Indentation of 4 instead of 2
     |        raise SystemExit("USAGE: s3_cache.py <download | upload> 
<friendly name> <dependencies file> <directory>")

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:092
 Indentation of 4 instead of 2
     |        raise SystemExit("Could not access bucket!")

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:100
 Indentation of 4 instead of 2
     |        download(directory)

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:102
 Indentation of 4 instead of 2
     |        if isfile(NEED_TO_UPLOAD_MARKER):  # FIXME

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:103
 Indentation of 4 instead of 2
     |            upload(directory)

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:105
 Indentation of 4 instead of 2
     |            print("No need to upload anything.")

T100:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:107
 Indentation of 4 instead of 2
     |        raise SystemExit("Unrecognized mode {!r}".format(mode))

T802:WARNING 
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:064
 open() calls should be made within a contextmanager.
     |        open(NEED_TO_UPLOAD_MARKER, 'a').close()

E501:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:050
 line too long (105 > 100 characters)
     |    run(['tar', '-czf', _tarball_filename_for(directory), '-C', 
dirname(directory), basename(directory)])

E501:ERROR   
3rdparty/javascript/scheduler/assets/bower_components/bootstrap/test-infra/s3_cache.py:086
 line too long (114 > 100 characters)
     |        raise SystemExit("USAGE: s3_cache.py <download | upload> 
<friendly name> <dependencies file> <directory>")

{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to