From fcfce474ae820c79afc803a8e702b3bd20a537ee Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Thu, 16 Jan 2020 11:32:06 +0100
Subject: [PATCH] pep8

---
 inventory_provider/routes/classifier.py | 13 ++++++-------
 test/test_classifier_routes.py          | 10 +++++++---
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/inventory_provider/routes/classifier.py b/inventory_provider/routes/classifier.py
index 76bae856..a64a662d 100644
--- a/inventory_provider/routes/classifier.py
+++ b/inventory_provider/routes/classifier.py
@@ -152,8 +152,8 @@ def get_juniper_link_info(source_equipment, interface):
             result['services'] = json.loads(services.decode('utf=8'))
             for s in result['services']:
                 top_level_services.extend(get_top_level_services(s['id'], r))
-            l = [_location_from_service_dict(s) for s in result['services']]
-            result['locations'] += l
+            result['locations'] += [
+                _location_from_service_dict(s) for s in result['services']]
 
         ifc_info = r.get(
             'netconf-interfaces:%s:%s' % (source_equipment, interface))
@@ -265,7 +265,6 @@ def find_interfaces(address):
                 yield ifc
 
 
-
 def find_interfaces_and_services(address_str):
     """
 
@@ -342,8 +341,8 @@ def peer_info(address):
         if interfaces:
             result['interfaces'] = interfaces
             for i in interfaces:
-                l = [_location_from_service_dict(s) for s in i['services']]
-                result['locations'] += l
+                result['locations'] += [
+                    _location_from_service_dict(s) for s in i['services']]
 
         result['locations'] = _unique_dicts_from_list(result['locations'])
         result = json.dumps(result)
@@ -384,8 +383,8 @@ def get_trap_metadata(source_equipment, interface, circuit_id):
                     top_level_services.extend(tls)
             if top_level_services:
                 result['related-services'] = top_level_services
-            l = [_location_from_service_dict(s) for s in result['services']]
-            result['locations'] += l
+            result['locations'] += [
+                _location_from_service_dict(s) for s in result['services']]
 
         gl = r.get('opsdb:geant_lambdas:%s' % circuit_id.lower())
         if gl:
diff --git a/test/test_classifier_routes.py b/test/test_classifier_routes.py
index c0c92c13..56821fcb 100644
--- a/test/test_classifier_routes.py
+++ b/test/test_classifier_routes.py
@@ -386,7 +386,7 @@ def test_coriant_info(
                     'abbreviation': '999'
                 }
             }
-    })
+        })
 
     rv = client.get(
         '/classifier/coriant-info/{equipment}/{entity}'.format(
@@ -408,8 +408,12 @@ def test_coriant_info(
             'E': equipment,
             'CID': card_id,
             'P': port_number,
-            'a': {'equipment name': 'abc', 'pop': {'name': 'zzz', 'abbreviation': '123'}},
-            'b': {'equipment name': 'ddd', 'pop': {'name': 'aaa', 'abbreviation': '999'}}
+            'a': {
+                'equipment name': 'abc',
+                'pop': {'name': 'zzz', 'abbreviation': '123'}},
+            'b': {
+                'equipment name': 'ddd',
+                'pop': {'name': 'aaa', 'abbreviation': '999'}}
         },
         'locations': [{
             'a': {'equipment': 'abc', 'name': 'zzz', 'abbreviation': '123'},
-- 
GitLab