Skip to content

Commit 666df98

Browse files
committed
Pin Python version to 3.12, fix #126
1 parent 5199d9f commit 666df98

File tree

4 files changed

+20
-21
lines changed

4 files changed

+20
-21
lines changed

challenges/advanced-forward/solution.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def copy(self) -> "MyClass":
1414
# class MyClass:
1515
# def __init__(self, x: int) -> None:
1616
# self.x = x
17-
#
17+
#
1818
# # TODO: Fix the type hints of `copy` to make it type check
1919
# def copy(self) -> MyClass:
2020
# copied_object = MyClass(x=self.x)

challenges/advanced-variadic-generics/solution.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# def __add__(self, other: "Array[*Ts]") -> "Array[*Ts]":
1212
# ...
1313

14+
1415
# For Python >= 3.12
1516
class Array[*Ts]:
1617
def __add__(self, other: "Array[*Ts]") -> "Array[*Ts]":

challenges/extreme-self-casting/solution.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
# # For Python < 3.12
1616
# R = TypeVar("R")
1717
# P = ParamSpec("P")
18-
#
19-
#
18+
#
19+
#
2020
# class Fn(Generic[R, P]):
2121
# def __init__(self, f: Callable[P, R]):
2222
# self.f = f
23-
#
23+
#
2424
# def transform_callable(self) -> Callable[Concatenate[object, P], R]:
2525
# ...
2626

pyproject.toml

+15-17
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,17 @@
22
name = ""
33
version = ""
44
description = ""
5-
authors = [
6-
{name = "laike9m", email = "laike9m@gmail.com"},
7-
]
5+
authors = [{ name = "laike9m", email = "laike9m@gmail.com" }]
86
dependencies = [
9-
"flask>=3.0.0",
10-
"pyright>=1.1.338",
11-
"flask-sitemapper>=1.7.0",
12-
"markdown>=3.5.1",
13-
"flask-htmx>=0.3.2",
7+
"flask>=3.0.0",
8+
"pyright>=1.1.338",
9+
"flask-sitemapper>=1.7.0",
10+
"markdown>=3.5.1",
11+
"flask-htmx>=0.3.2",
1412
]
15-
requires-python = ">=3.12"
13+
requires-python = "~=3.12"
1614
readme = "README.md"
17-
license = {text = "MIT"}
15+
license = { text = "MIT" }
1816

1917
[tool.pdm]
2018
plugins = ["pdm-autoexport"]
@@ -24,16 +22,16 @@ dev = "flask --app app run --debug"
2422
test = "pytest -n auto"
2523
run_ruff = "ruff format"
2624
djhtml.cmd = "djhtml --tabwidth 2 templates"
27-
djhtml.env = {PYTHONUTF8 = "1"}
28-
format = {composite = ["run_ruff", "djhtml"]}
25+
djhtml.env = { PYTHONUTF8 = "1" }
26+
format = { composite = ["run_ruff", "djhtml"] }
2927

3028
[tool.pdm.dev-dependencies]
3129
dev = [
32-
"pytest>=7.4.3",
33-
"djhtml>=3.0.6",
34-
"pre-commit>=3.5.0",
35-
"pytest-xdist>=3.3.1",
36-
"ruff>=0.1.14",
30+
"pytest>=7.4.3",
31+
"djhtml>=3.0.6",
32+
"pre-commit>=3.5.0",
33+
"pytest-xdist>=3.3.1",
34+
"ruff>=0.1.14",
3735
]
3836

3937
[[tool.pdm.autoexport]]

0 commit comments

Comments
 (0)