ruff removed unused imports

This commit is contained in:
2023-01-19 21:34:09 +00:00
parent 89b0c0862e
commit 1be3a3892c
12 changed files with 64 additions and 117 deletions

View File

@@ -1,11 +1,10 @@
import csv
import os
import re
from datetime import date
from django.conf import settings
from troggle.core.models.caves import QM, Cave, LogbookEntry
from troggle.core.models.caves import QM, Cave
from troggle.core.models.troggle import DataIssue
from troggle.core.utils import save_carefully
@@ -79,7 +78,7 @@ def parseCaveQMs(cave, inputFile, ticked=False):
try:
n += 1
year = int(line[0][1:5])
logslug = f"PH_{int(year)}_{int(n):02d}"
f"PH_{int(year)}_{int(n):02d}"
QMnum = re.match(r".*?-\d*?-X?(?P<numb>\d*)", line[0]).group("numb")
newQM = QM()
# newQM.found_by=placeholder
@@ -108,7 +107,7 @@ def parseCaveQMs(cave, inputFile, ticked=False):
number=QMnum, found_by__date__year=year
) # if we don't have this one in the DB, save it
if (
preexistingQM.new_since_parsing == False
preexistingQM.new_since_parsing is False
): # if the pre-existing QM has not been modified, overwrite it - VERY OLD THING
preexistingQM.delete()
newQM.expoyear = year