Skip to content

Commit 8c072c7

Browse files
committed
FIX: more linter fixes
1 parent 12dfb68 commit 8c072c7

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

MethodicConfigurator/frontend_tkinter_component_editor.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def __set_gnss_type_and_protocol_from_fc_parameters(self, fc_parameters: dict) -
380380
logging_error("GPS_TYPE %u not in gnss_receiver_connection", gps1_type)
381381
self.data["Components"]["GNSS Receiver"]["FC Connection"]["Type"] = "None"
382382

383-
def __set_serial_type_and_protocol_from_fc_parameters(self, fc_parameters: dict) -> bool:
383+
def __set_serial_type_and_protocol_from_fc_parameters(self, fc_parameters: dict[str, float]) -> bool:
384384
if "RC_PROTOCOLS" in fc_parameters:
385385
rc_protocols_nr = int(fc_parameters["RC_PROTOCOLS"])
386386
# check if rc_protocols_nr is a power of two (only one bit set)
@@ -397,9 +397,8 @@ def __set_serial_type_and_protocol_from_fc_parameters(self, fc_parameters: dict)
397397
for serial in self.serial_ports:
398398
if serial + "_PROTOCOL" not in fc_parameters:
399399
continue
400-
serial_protocol_nr = fc_parameters[serial + "_PROTOCOL"]
401400
try:
402-
serial_protocol_nr = int(serial_protocol_nr)
401+
serial_protocol_nr = int(fc_parameters[serial + "_PROTOCOL"])
403402
except ValueError:
404403
msg = _("Invalid non-integer value for {serial}_PROTOCOL {serial_protocol_nr}")
405404
logging_error(msg.format(**locals()))

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ classifiers = [
2121
"Intended Audience :: Science/Research",
2222
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
2323
"Operating System :: OS Independent",
24-
"Programming Language :: Python :: 3",
2524
"Programming Language :: Python :: 3.9",
2625
"Programming Language :: Python :: 3.10",
2726
"Programming Language :: Python :: 3.11",
@@ -133,7 +132,8 @@ lint.ignore = [
133132
line-length = 127
134133
indent-width = 4
135134

136-
target-version = "py39"
135+
[tool.ruff.lint.per-file-ignores]
136+
"unittests/*" = ["UP031"]
137137

138138
[tool.mypy]
139139
ignore_missing_imports = true

0 commit comments

Comments
 (0)