Skip to content

Commit e10a107

Browse files
committed
ruff fixes
1 parent 6f19974 commit e10a107

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

aoc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def run(
8888

8989
# Make sure we're not sending example data
9090
if is_example is True:
91-
print(f"[red]You can't send an answer for example data[/red]")
91+
print("[red]You can't send an answer for example data[/red]")
9292
raise typer.Exit(1)
9393

9494
# Send the solution for the tasks having an answer

scripts/utils.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,17 @@ def create_empty_file(file_path: Path) -> None:
7575

7676
def get_input(day: int) -> str | None:
7777
if not (session_id := os.getenv("AOC_SESSION_ID")):
78-
print(f"[rouge]No session ID found, input can't be retrieved from AoC[/rouge]")
78+
print("[rouge]No session ID found, input can't be retrieved from AoC[/rouge]")
7979
return
8080

8181
input_url = f"{os.getenv('AOC_BASE_URL')}/day/{day}/input"
82-
print(f"Retrieving input data from AoC...")
82+
print("Retrieving input data from AoC...")
8383
response = httpx.get(input_url, cookies={"session": session_id})
8484
if response.status_code != httpx.codes.OK:
8585
print(f"[red]Error from AoC when retrieving input : {response}[/red]")
8686
return
8787

88-
print(f"[green]Input data retrieved from AoC ![/green]")
88+
print("[green]Input data retrieved from AoC ![/green]")
8989
return response.text
9090

9191

@@ -97,7 +97,7 @@ class AnswerResult(Enum):
9797

9898
def submit_answer(day: int, task: int, answer: int) -> AnswerResult | None:
9999
if not (session_id := os.getenv("AOC_SESSION_ID")):
100-
print(f"[rouge]No session ID found, input can't be retrieved from AoC[/rouge]")
100+
print("[rouge]No session ID found, input can't be retrieved from AoC[/rouge]")
101101
return
102102

103103
print(f"Submitting answer for task {task} to AoC...")
@@ -111,7 +111,7 @@ def submit_answer(day: int, task: int, answer: int) -> AnswerResult | None:
111111
print(f"[red]Error from AoC when submitting solution : {response}[/red]")
112112
return
113113

114-
print(f"[green]Answer submitted to AoC ![/green]")
114+
print("[green]Answer submitted to AoC ![/green]")
115115

116116
if "That's the right answer" in response.text:
117117
return AnswerResult.RIGHT_ANSWER

0 commit comments

Comments
 (0)