Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
zarath committed Mar 5, 2023
1 parent 185a64b commit c0e177b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 25 deletions.
3 changes: 2 additions & 1 deletion NanoVNASaver/Analysis/BandPassAnalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ def runAnalysis(self):
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.")
Expand Down
4 changes: 2 additions & 2 deletions NanoVNASaver/Charts/RIMu.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ def setCoreLength(self):
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):
Expand Down
7 changes: 3 additions & 4 deletions NanoVNASaver/Windows/MarkerSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,14 @@ def updateMarker(self):

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):
Expand Down
18 changes: 0 additions & 18 deletions test/__init__.py
Original file line number Diff line number Diff line change
@@ -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 <https://www.gnu.org/licenses/>.

0 comments on commit c0e177b

Please sign in to comment.