flake8: make entire repository pass spack flake8 -a
- Fix trailing whitespace missed by the bug described in #12755. - Fix other style issues that have crept in over time (this can happen when flake8 adds new checks with new versions)
This commit is contained in:
@@ -231,7 +231,7 @@ def install_args(self, spec, prefix):
|
||||
if ('py-setuptools' == spec.name or # this is setuptools, or
|
||||
'py-setuptools' in spec._dependencies and # it's an immediate dep
|
||||
'build' in spec._dependencies['py-setuptools'].deptypes):
|
||||
args += ['--single-version-externally-managed', '--root=/']
|
||||
args += ['--single-version-externally-managed', '--root=/']
|
||||
|
||||
return args
|
||||
|
||||
|
@@ -57,7 +57,7 @@ def setup_parser(subparser):
|
||||
index = subparsers.add_parser('index', help=update_index.__doc__)
|
||||
|
||||
index.add_argument('-e', '--endpoint-url',
|
||||
default='https://s3.spack.io', help='URL of mirror')
|
||||
default='https://s3.spack.io', help='URL of mirror')
|
||||
|
||||
index.set_defaults(func=update_index)
|
||||
|
||||
|
@@ -247,8 +247,8 @@ def add_subcommand_group(title, commands):
|
||||
spack help --all list all commands and options
|
||||
spack help <command> help on a specific command
|
||||
spack help --spec help on the package specification syntax
|
||||
spack docs open http://spack.rtfd.io/ in a browser"""
|
||||
.format(help=section_descriptions['help']))
|
||||
spack docs open http://spack.rtfd.io/ in a browser
|
||||
""".format(help=section_descriptions['help']))
|
||||
|
||||
# determine help from format above
|
||||
return formatter.format_help()
|
||||
|
@@ -78,7 +78,7 @@
|
||||
}
|
||||
},
|
||||
'patternProperties': {
|
||||
r'^(?!when$)\w*': spec_list_schema
|
||||
r'^(?!when$)\w*': spec_list_schema
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -87,35 +87,36 @@
|
||||
'anyOf': [
|
||||
{'type': 'boolean'},
|
||||
{'type': 'string'},
|
||||
{'type': 'object',
|
||||
'patternProperties': {
|
||||
r'\w+': {
|
||||
'required': ['root'],
|
||||
'additionalProperties': False,
|
||||
'properties': {
|
||||
'root': {
|
||||
'type': 'string'
|
||||
},
|
||||
'link': {
|
||||
'type': 'string',
|
||||
'pattern': '(roots|all)',
|
||||
},
|
||||
'select': {
|
||||
'type': 'array',
|
||||
'items': {
|
||||
'type': 'string'
|
||||
}
|
||||
},
|
||||
'exclude': {
|
||||
'type': 'array',
|
||||
'items': {
|
||||
'type': 'string'
|
||||
}
|
||||
},
|
||||
'projections': projections_scheme
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
'type': 'object',
|
||||
'patternProperties': {
|
||||
r'\w+': {
|
||||
'required': ['root'],
|
||||
'additionalProperties': False,
|
||||
'properties': {
|
||||
'root': {
|
||||
'type': 'string'
|
||||
},
|
||||
'link': {
|
||||
'type': 'string',
|
||||
'pattern': '(roots|all)',
|
||||
},
|
||||
'select': {
|
||||
'type': 'array',
|
||||
'items': {
|
||||
'type': 'string'
|
||||
}
|
||||
},
|
||||
'exclude': {
|
||||
'type': 'array',
|
||||
'items': {
|
||||
'type': 'string'
|
||||
}
|
||||
},
|
||||
'projections': projections_scheme
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -83,8 +83,9 @@
|
||||
'cdash': {
|
||||
'oneOf': [
|
||||
{'type': 'string'},
|
||||
{'type': 'array',
|
||||
'items': {'type': 'string'}
|
||||
{
|
||||
'type': 'array',
|
||||
'items': {'type': 'string'}
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@@ -616,7 +616,7 @@ def test_bad_command_line_scopes(tmpdir, mock_config):
|
||||
def test_add_command_line_scopes(tmpdir, mutable_config):
|
||||
config_yaml = str(tmpdir.join('config.yaml'))
|
||||
with open(config_yaml, 'w') as f:
|
||||
f.write("""\
|
||||
f.write("""\
|
||||
config:
|
||||
verify_ssl: False
|
||||
dirty: False
|
||||
|
@@ -27,15 +27,14 @@ def subtract(self):
|
||||
def implementation(interface):
|
||||
"""Returns an implementation of the interface"""
|
||||
class Implementation(interface):
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
def add(self):
|
||||
interface.counter += self.value
|
||||
|
||||
def add(self):
|
||||
interface.counter += self.value
|
||||
|
||||
def subtract(self):
|
||||
interface.counter -= self.value
|
||||
def subtract(self):
|
||||
interface.counter -= self.value
|
||||
|
||||
return Implementation
|
||||
|
||||
|
@@ -714,7 +714,7 @@ def test_disjoint_set_initialization():
|
||||
# Test that no error is thrown when the sets are disjoint
|
||||
d = disjoint_sets(('a',), ('b', 'c'), ('e', 'f'))
|
||||
|
||||
assert d.default is 'none'
|
||||
assert d.default == 'none'
|
||||
assert d.multi is True
|
||||
assert set(x for x in d) == set(['none', 'a', 'b', 'c', 'e', 'f'])
|
||||
|
||||
|
Reference in New Issue
Block a user