From 4251695eaf8abe5d7f31d4c64da5ca8862a371b4 Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Tue, 2 Apr 2024 13:47:46 +0200
Subject: [PATCH] pep8 (and fixed merged conflicts)

---
 brian_polling_manager/interface_stats/services.py    |  6 +++++-
 .../interface_stats/vendors/common.py                |  1 -
 test/interface_stats/conftest.py                     | 12 ++++++------
 test/interface_stats/test_interface_stats.py         |  3 ++-
 4 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/brian_polling_manager/interface_stats/services.py b/brian_polling_manager/interface_stats/services.py
index bff2d45..f124855 100644
--- a/brian_polling_manager/interface_stats/services.py
+++ b/brian_polling_manager/interface_stats/services.py
@@ -1,3 +1,8 @@
+"""
+@pelle: this module doesn't seem to serve any purpose, except
+to wrap calls to influx.write_points (and the DI approach is not used)
+... please simplify/remove it
+"""
 import json
 import logging
 import sys
@@ -5,7 +10,6 @@ from typing import Callable, Iterable
 from urllib.parse import urlparse
 
 from influxdb import InfluxDBClient
-
 logger = logging.getLogger(__name__)
 
 DEFAULT_INFLUX_BATCH_SIZE = 100
diff --git a/brian_polling_manager/interface_stats/vendors/common.py b/brian_polling_manager/interface_stats/vendors/common.py
index a200380..8f85efc 100644
--- a/brian_polling_manager/interface_stats/vendors/common.py
+++ b/brian_polling_manager/interface_stats/vendors/common.py
@@ -304,4 +304,3 @@ def parse_interface_xml(node, struct: dict, defaults=None):
             continue
         result[key] = parsed
     return result or None
-
diff --git a/test/interface_stats/conftest.py b/test/interface_stats/conftest.py
index db73099..b610e1b 100644
--- a/test/interface_stats/conftest.py
+++ b/test/interface_stats/conftest.py
@@ -70,14 +70,14 @@ def all_nokia_routers():
     return NOKIA_ROUTERS
 
 
-"""
-@pelle: having a fixture that is used only in one place, and in a
-separate file from where it is used only decreases readability.
-Please move it ... or (to minimize ambiguity) use pytest.mark.parametrize
-(this and the one below)
-"""
 @pytest.fixture(params=JUNIPER_ROUTERS)
 def juniper_router_fqdn(request):
+    """
+    @pelle: having a fixture that is used only in one place, and in a
+    separate file from where it is used only decreases readability.
+    Please move it ... or (to minimize ambiguity) use pytest.mark.parametrize
+    (this and the one below)
+    """
     return request.param
 
 
diff --git a/test/interface_stats/test_interface_stats.py b/test/interface_stats/test_interface_stats.py
index d5c4798..421417f 100644
--- a/test/interface_stats/test_interface_stats.py
+++ b/test/interface_stats/test_interface_stats.py
@@ -19,6 +19,7 @@ from ncclient.operations.rpc import RPCReply
             fresh router configs to know if our code breaks
 """
 
+
 def test_sanity_check_snapshot_data(polled_interfaces, all_juniper_routers):
     """
     verify that all routers with interfaces to be polled
@@ -522,7 +523,7 @@ def test_prepare_influx_params(input_params, expected):
 
 @pytest.mark.parametrize(
     "hostname",
-    [ 'rt0.lon.uk.lab.office.geant.net', 'rt0.ams.nl.lab.office.geant.net' ]
+    ['rt0.lon.uk.lab.office.geant.net', 'rt0.ams.nl.lab.office.geant.net']
 )
 def test_nokia_counters(hostname):
     """
-- 
GitLab