Skip to content

Commit

Permalink
Happify linters.
Browse files Browse the repository at this point in the history
  • Loading branch information
thedrow committed Sep 24, 2020
1 parent a99a903 commit 5e05400
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion celery/bin/graph.py
Expand Up @@ -43,7 +43,7 @@ def maybe_list(l, sep=','):

def generic_label(node):
return '{} ({}://)'.format(type(node).__name__,
node._label.split('://')[0])
node._label.split('://')[0])

class Node:
force_label = None
Expand Down
4 changes: 2 additions & 2 deletions t/integration/test_backend.py
Expand Up @@ -9,8 +9,8 @@


@pytest.mark.skipif(
not os.environ.get('AZUREBLOCKBLOB_URL'),
reason='Environment variable AZUREBLOCKBLOB_URL required'
not os.environ.get('AZUREBLOCKBLOB_URL'),
reason='Environment variable AZUREBLOCKBLOB_URL required'
)
class test_AzureBlockBlobBackend:
def test_crud(self, manager):
Expand Down
4 changes: 2 additions & 2 deletions t/unit/backends/test_mongodb.py
Expand Up @@ -178,7 +178,7 @@ def test_ensure_mongodb_uri_compliance(self):
assert compliant_uri('mongodb://') == 'mongodb://localhost'

assert compliant_uri('mongodb+something://host') == \
'mongodb+something://host'
'mongodb+something://host'

assert compliant_uri('something://host') == 'mongodb+something://host'

Expand Down Expand Up @@ -647,7 +647,7 @@ def find_one(self, task_id):
@pytest.mark.parametrize("serializer,result_type,result", [
(s, type(i['result']), i['result']) for i in SUCCESS_RESULT_TEST_DATA
for s in i['serializers']]
)
)
def test_encode_success_results(self, mongo_backend_factory, serializer,
result_type, result):
backend = mongo_backend_factory(serializer=serializer)
Expand Down
26 changes: 13 additions & 13 deletions t/unit/contrib/test_migrate.py
Expand Up @@ -23,19 +23,19 @@ def Message(body, exchange='exchange', routing_key='rkey',
compression=None, content_type='application/json',
content_encoding='utf-8'):
return Mock(
body=body,
delivery_info={
'exchange': exchange,
'routing_key': routing_key,
},
headers={
'compression': compression,
},
content_type=content_type,
content_encoding=content_encoding,
properties={
'correlation_id': isinstance(body, dict) and body['id'] or None
}
body=body,
delivery_info={
'exchange': exchange,
'routing_key': routing_key,
},
headers={
'compression': compression,
},
content_type=content_type,
content_encoding=content_encoding,
properties={
'correlation_id': isinstance(body, dict) and body['id'] or None
}
)


Expand Down
8 changes: 4 additions & 4 deletions t/unit/utils/test_sysinfo.py
Expand Up @@ -12,8 +12,8 @@


@pytest.mark.skipif(
not hasattr(os, 'getloadavg'),
reason='Function os.getloadavg is not defined'
not hasattr(os, 'getloadavg'),
reason='Function os.getloadavg is not defined'
)
def test_load_average(patching):
getloadavg = patching('os.getloadavg')
Expand All @@ -24,8 +24,8 @@ def test_load_average(patching):


@pytest.mark.skipif(
not hasattr(posix, 'statvfs_result'),
reason='Function posix.statvfs_result is not defined'
not hasattr(posix, 'statvfs_result'),
reason='Function posix.statvfs_result is not defined'
)
def test_df():
x = df('/')
Expand Down

0 comments on commit 5e05400

Please sign in to comment.