convey high/low hints if present
All checks were successful
Publish to PyPI / Publish to PyPI (push) Successful in 1m29s

This commit is contained in:
Stefan Harmuth 2023-12-03 14:53:56 +01:00
parent db23b11a98
commit a47077f102

View File

@ -168,7 +168,7 @@ class AOCDay:
"https://adventofcode.com/%d/day/%d#part2" % (self.year, self.day) "https://adventofcode.com/%d/day/%d#part2" % (self.year, self.day)
) )
elif "That's not the right answer" in message: elif "That's not the right answer" in message:
hilo = re.findall("was too (high|low)", message) hilo = re.findall("your answer is too (high|low)", message)
answer_cache[str_day][str_part]["wrong"].append(answer) answer_cache[str_day][str_part]["wrong"].append(answer)
print("That's WRONG%s!" % (f" (too {hilo[0]})" if hilo else "")) print("That's WRONG%s!" % (f" (too {hilo[0]})" if hilo else ""))
elif "You gave an answer too recently" in message: elif "You gave an answer too recently" in message: