all: Fix various Python coding inconsistencies found by ruff.

This fixes:
- type-comparison (E721): do not compare types, use isinstance().
- string-dot-format-missing-arguments (F524): .format call is missing
  argument(s) for placeholder(s): {message}.
- f-string-missing-placeholders (F541).
- is-literal (F632): Use != to compare constant literals.

The last one is fixed by just comparing for truthfulness of `state`.
This commit is contained in:
Christian Clauss
2023-03-10 05:59:28 +01:00
committed by Damien George
parent 8f8bd98164
commit 79e57473b2
4 changed files with 4 additions and 4 deletions

View File

@@ -124,7 +124,7 @@ class Pins:
continue
if not row[pin_col].isdigit():
raise ValueError(
"Invalid pin number {:s} in row {:s}".format(row[pin_col]), row
"Invalid pin number {:s} in row {:s}".format(row[pin_col], row)
)
# Pin numbers must start from 0 when used with the TI API
pin_num = int(row[pin_col]) - 1