lint: tidy up code some more, pylint is enforcing

This commit is contained in:
Iain Learmonth 2022-06-17 14:02:10 +01:00
parent 66b3ccc0f0
commit 61564e8c01
17 changed files with 72 additions and 38 deletions

View file

@ -50,7 +50,7 @@ def impot(model: db.Model) -> None:
line[idx] = datetime.datetime.strptime(line[idx], "%Y-%m-%d %H:%M:%S.%f") # type: ignore
elif field_name in ["eotk", "auto_rotation", "smart"]:
# boolean fields
line[idx] = line[idx] == "True" # type: ignore
line[idx] = line[idx] == "True"
elif field_name.endswith("_id") and line[idx] == "":
# integer foreign keys
line[idx] = None # type: ignore