Fix code formatting issues
This commit is contained in:
parent
d35d56cb81
commit
d1b7c604b5
@ -42,7 +42,7 @@ class NoEClassException(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class CompetitionClassParser:
|
class CompetitionClassParser:
|
||||||
E = CompetitionClass('E')
|
E = CompetitionClass("E")
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.mapNames = {
|
self.mapNames = {
|
||||||
@ -59,7 +59,7 @@ class CompetitionClassParser:
|
|||||||
# return CombinedCompetitionClass(clsA, clsB)
|
# return CombinedCompetitionClass(clsA, clsB)
|
||||||
# else:
|
# else:
|
||||||
# return self.mapNames[cls]
|
# return self.mapNames[cls]
|
||||||
|
|
||||||
if cls in self.mapNames:
|
if cls in self.mapNames:
|
||||||
return self.mapNames[cls]
|
return self.mapNames[cls]
|
||||||
else:
|
else:
|
||||||
|
@ -38,7 +38,10 @@ class HtmlParser:
|
|||||||
|
|
||||||
match = re.compile('.*?OT, Solos (.*?)(?: ".*")?').fullmatch(title)
|
match = re.compile('.*?OT, Solos (.*?)(?: ".*")?').fullmatch(title)
|
||||||
if match is None:
|
if match is None:
|
||||||
self.l.info('Cannot parse html title "%s". Is it a solo competition? Possible bug.', title)
|
self.l.info(
|
||||||
|
'Cannot parse html title "%s". Is it a solo competition? Possible bug.',
|
||||||
|
title,
|
||||||
|
)
|
||||||
raise Exception(f'Cannot parse title "{title}".')
|
raise Exception(f'Cannot parse title "{title}".')
|
||||||
|
|
||||||
rest = match.group(1)
|
rest = match.group(1)
|
||||||
|
@ -26,9 +26,7 @@ class HtmlCompetitionTotalResults:
|
|||||||
) -> list[HtmlSingleCompetitionResult]:
|
) -> list[HtmlSingleCompetitionResult]:
|
||||||
return self.results[self.__getTuple(group, class_, dance, id)]
|
return self.results[self.__getTuple(group, class_, dance, id)]
|
||||||
|
|
||||||
def getById(
|
def getById(self, id: int) -> dict[
|
||||||
self, id: int
|
|
||||||
) -> dict[
|
|
||||||
tuple[str, solo_turnier.group.Group_t, solo_turnier.competition_class.Class_t],
|
tuple[str, solo_turnier.group.Group_t, solo_turnier.competition_class.Class_t],
|
||||||
HtmlSingleCompetitionResult,
|
HtmlSingleCompetitionResult,
|
||||||
]:
|
]:
|
||||||
|
@ -32,7 +32,11 @@ class ResultExtractor:
|
|||||||
try:
|
try:
|
||||||
data = parser.guessDataFromHtmlTitle()
|
data = parser.guessDataFromHtmlTitle()
|
||||||
except competition_class.NoEClassException as ex:
|
except competition_class.NoEClassException as ex:
|
||||||
self.l.info('The HTML file %s does not represent a solo E class. Skipping it. (%s)', filePair[0], ex)
|
self.l.info(
|
||||||
|
"The HTML file %s does not represent a solo E class. Skipping it. (%s)",
|
||||||
|
filePair[0],
|
||||||
|
ex,
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
except:
|
except:
|
||||||
self.l.warning(
|
self.l.warning(
|
||||||
|
Loading…
Reference in New Issue
Block a user