Skip to content

Commit 94fc312

Browse files
Adopt minimum of python 3.14 (#173)
* Require >=3.14 python * Fix new ruff errors * Remove obsolete __future__ annotations imports
1 parent 106aea4 commit 94fc312

36 files changed

Lines changed: 80 additions & 66 deletions

aoc-main/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "aoc-main"
33
version = "0.1.0"
4-
requires-python = ">=3.13"
4+
requires-python = ">=3.14"
55
dependencies = [
66
"pyyaml==6.0.3"
77
]

aoc-main/src/aoc_main/_answers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import functools
2-
from collections.abc import Iterator
3-
from typing import NewType, overload
2+
from typing import TYPE_CHECKING, NewType, overload
43

54
import yaml
65

76
from aoc_main import _solvers, _types, _utils
87

8+
if TYPE_CHECKING:
9+
from collections.abc import Iterator
10+
911
AnswerIntType = NewType("AnswerIntType", int)
1012
AnswerStrType = NewType("AnswerStrType", str)
1113
AnswerType = AnswerIntType | AnswerStrType

aoc-main/src/aoc_main/_exec_solver.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import asyncio
42
import os
53
import shutil

aoc-main/src/aoc_main/_inputs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
import pathlib
1+
from typing import TYPE_CHECKING
22

33
from aoc_main import _types, _utils
44

5+
if TYPE_CHECKING:
6+
import pathlib
7+
58

69
def get_input_file_path(year: _types.Year, day: _types.Day) -> pathlib.Path:
710
return _utils.get_repo_root() / "inputs" / f"{year}-{day:02}.txt"

aoc-main/src/aoc_main/_solver_cpp.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import asyncio
42
import json
53
import os

aoc-main/src/aoc_main/_solver_python.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import asyncio
42
import os
53

aoc-main/src/aoc_main/_solver_rust.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import asyncio
42
import json
53
import os

aoc-main/src/aoc_main/_solvers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import enum
42
import functools
53
from dataclasses import dataclass

aoc-main/src/aoc_main/main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import asyncio
42
import logging
53
import sys

aoc-main/uv.lock

Lines changed: 1 addition & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)