From 2b7c476185a6322f8d90f455583e3b81bc5e1920 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Bayle <j2b.bayle@gmail.com>
Date: Mon, 4 Apr 2022 12:52:18 +0200
Subject: [PATCH] Fix Pylint warnings

---
 lisainstrument/instrument.py | 2 +-
 tests/test_fplan.py          | 7 +++----
 tests/test_instrument.py     | 1 -
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/lisainstrument/instrument.py b/lisainstrument/instrument.py
index dca24db..fa3d407 100755
--- a/lisainstrument/instrument.py
+++ b/lisainstrument/instrument.py
@@ -832,7 +832,7 @@ class Instrument:
         logger.info("Simulating local beams")
         self.simulate_locking()
 
-        ## simulate sidebands
+        ## Simulate sidebands
 
         logger.debug("Computing upper sideband offsets for primary local beam")
         self.local_usb_offsets = self.local_carrier_offsets \
diff --git a/tests/test_fplan.py b/tests/test_fplan.py
index f9a65ae..9fe77c3 100755
--- a/tests/test_fplan.py
+++ b/tests/test_fplan.py
@@ -59,7 +59,7 @@ def _valid_locking_beatnotes(instru, fplan=None):
             np.allclose(instru.tps_isi_carrier_offsets['21'], fplan['21']),
             np.allclose(instru.tps_rfi_carrier_offsets['23'], fplan['23']),
         ])
-    elif instru.lock_config == 'N1-21':
+    if instru.lock_config == 'N1-21':
         return np.all([
             np.allclose(instru.tps_rfi_carrier_offsets['23'], fplan['23']),
             np.allclose(instru.tps_isi_carrier_offsets['32'], fplan['32']),
@@ -67,7 +67,7 @@ def _valid_locking_beatnotes(instru, fplan=None):
             np.allclose(instru.tps_isi_carrier_offsets['12'], fplan['12']),
             np.allclose(instru.tps_rfi_carrier_offsets['13'], fplan['13']),
         ])
-    elif instru.lock_config == 'N4-12':
+    if instru.lock_config == 'N4-12':
         return np.all([
             np.allclose(instru.tps_rfi_carrier_offsets['13'], fplan['13']),
             np.allclose(instru.tps_isi_carrier_offsets['31'], fplan['31']),
@@ -75,8 +75,7 @@ def _valid_locking_beatnotes(instru, fplan=None):
             np.allclose(instru.tps_isi_carrier_offsets['23'], fplan['23']),
             np.allclose(instru.tps_isi_carrier_offsets['21'], fplan['21']),
         ])
-    else:
-        raise ValueError(f"unsupported lock configuration '{instru.lock_config}'")
+    raise ValueError(f"unsupported lock configuration '{instru.lock_config}'")
 
 def test_static_fplan():
     """Test the default static set of locking beatnotes."""
diff --git a/tests/test_instrument.py b/tests/test_instrument.py
index 721218e..54adb73 100755
--- a/tests/test_instrument.py
+++ b/tests/test_instrument.py
@@ -2,7 +2,6 @@
 # -*- coding: utf-8 -*-
 # pylint: disable=missing-module-docstring
 
-import numpy as np
 import pytest
 from lisainstrument import Instrument
 
-- 
GitLab