From c0e177bf1a55ad52d9110ade94cb4b6fe2a27775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20M=C3=BCller?= Date: Sun, 5 Mar 2023 13:33:05 +0100 Subject: [PATCH] linting --- NanoVNASaver/Analysis/BandPassAnalysis.py | 3 ++- NanoVNASaver/Charts/RIMu.py | 4 ++-- NanoVNASaver/Windows/MarkerSettings.py | 7 +++---- test/__init__.py | 18 ------------------ 4 files changed, 7 insertions(+), 25 deletions(-) diff --git a/NanoVNASaver/Analysis/BandPassAnalysis.py b/NanoVNASaver/Analysis/BandPassAnalysis.py index dbf7563..45cbc63 100644 --- a/NanoVNASaver/Analysis/BandPassAnalysis.py +++ b/NanoVNASaver/Analysis/BandPassAnalysis.py @@ -133,7 +133,8 @@ class BandPassAnalysis(Analysis): if cutoff_gain['3.0dB_l'] < -4 or cutoff_gain['3.0dB_r'] < -4: logger.warning( "Data points insufficient for true -3 dB points." - "Cutoff gains: %fdB, %fdB", cutoff_gain['3.0dB_l'], cutoff_gain['3.0dB_r']) + "Cutoff gains: %fdB, %fdB", cutoff_gain['3.0dB_l'], + cutoff_gain['3.0dB_r']) self.set_result( f"Analysis complete ({len(s21)} points)\n" f"Insufficient data for analysis. Increase segment count.") diff --git a/NanoVNASaver/Charts/RIMu.py b/NanoVNASaver/Charts/RIMu.py index 7521a86..7282a06 100644 --- a/NanoVNASaver/Charts/RIMu.py +++ b/NanoVNASaver/Charts/RIMu.py @@ -147,8 +147,8 @@ class RealImaginaryMuChart(RealImaginaryChart): def setCoreArea(self): val, selected = QtWidgets.QInputDialog.getDouble( self, "Core effective area", - "Set core cross section area length in mm\N{SUPERSCRIPT TWO}", value=self.coreArea, - decimals=2) + "Set core cross section area length in mm\N{SUPERSCRIPT TWO}", + value=self.coreArea, decimals=2) if not selected: return if not (self.fixedValues and val >= 0): diff --git a/NanoVNASaver/Windows/MarkerSettings.py b/NanoVNASaver/Windows/MarkerSettings.py index ecdb8ea..2912a7f 100644 --- a/NanoVNASaver/Windows/MarkerSettings.py +++ b/NanoVNASaver/Windows/MarkerSettings.py @@ -111,15 +111,14 @@ class MarkerSettingsWindow(QtWidgets.QWidget): def updateField(self, field: QtGui.QStandardItem): if field.checkState() == QtCore.Qt.Checked: - if not field.data() in self.currentFieldSelection: + if field.data() not in self.currentFieldSelection: self.currentFieldSelection = [] for i in range(self.model.rowCount()): field = self.model.item(i, 0) if field.checkState() == QtCore.Qt.Checked: self.currentFieldSelection.append(field.data()) - else: - if field.data() in self.currentFieldSelection: - self.currentFieldSelection.remove(field.data()) + elif field.data() in self.currentFieldSelection: + self.currentFieldSelection.remove(field.data()) self.updateMarker() def applyButtonClick(self): diff --git a/test/__init__.py b/test/__init__.py index e9dffab..e69de29 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -1,18 +0,0 @@ -# NanoVNASaver -# -# A python program to view and export Touchstone data from a NanoVNA -# Copyright (C) 2019, 2020 Rune B. Broberg -# Copyright (C) 2020,2021 NanoVNA-Saver Authors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see .