From 5e05400dbe6054659b8818fd1ae56a7610a7f741 Mon Sep 17 00:00:00 2001 From: Omer Katz Date: Thu, 24 Sep 2020 17:56:58 +0300 Subject: [PATCH] Happify linters. --- celery/bin/graph.py | 2 +- t/integration/test_backend.py | 4 ++-- t/unit/backends/test_mongodb.py | 4 ++-- t/unit/contrib/test_migrate.py | 26 +++++++++++++------------- t/unit/utils/test_sysinfo.py | 8 ++++---- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/celery/bin/graph.py b/celery/bin/graph.py index 4a1b005120e..3013077b4b5 100644 --- a/celery/bin/graph.py +++ b/celery/bin/graph.py @@ -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 diff --git a/t/integration/test_backend.py b/t/integration/test_backend.py index 6355b3cb6e6..67816322a17 100644 --- a/t/integration/test_backend.py +++ b/t/integration/test_backend.py @@ -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): diff --git a/t/unit/backends/test_mongodb.py b/t/unit/backends/test_mongodb.py index 6bd498e373e..fb304b7e369 100644 --- a/t/unit/backends/test_mongodb.py +++ b/t/unit/backends/test_mongodb.py @@ -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' @@ -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) diff --git a/t/unit/contrib/test_migrate.py b/t/unit/contrib/test_migrate.py index 6754e536a6c..e36e2f32751 100644 --- a/t/unit/contrib/test_migrate.py +++ b/t/unit/contrib/test_migrate.py @@ -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 + } ) diff --git a/t/unit/utils/test_sysinfo.py b/t/unit/utils/test_sysinfo.py index f892788a446..25c8ff5f886 100644 --- a/t/unit/utils/test_sysinfo.py +++ b/t/unit/utils/test_sysinfo.py @@ -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') @@ -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('/')