Skip to content

Commit

Permalink
Pin Python version to 3.12, fix #126
Browse files Browse the repository at this point in the history
  • Loading branch information
laike9m committed Oct 31, 2024
1 parent 5199d9f commit 666df98
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion challenges/advanced-forward/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def copy(self) -> "MyClass":
# class MyClass:
# def __init__(self, x: int) -> None:
# self.x = x
#
#
# # TODO: Fix the type hints of `copy` to make it type check
# def copy(self) -> MyClass:
# copied_object = MyClass(x=self.x)
Expand Down
1 change: 1 addition & 0 deletions challenges/advanced-variadic-generics/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# def __add__(self, other: "Array[*Ts]") -> "Array[*Ts]":
# ...


# For Python >= 3.12
class Array[*Ts]:
def __add__(self, other: "Array[*Ts]") -> "Array[*Ts]":
Expand Down
6 changes: 3 additions & 3 deletions challenges/extreme-self-casting/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
# # For Python < 3.12
# R = TypeVar("R")
# P = ParamSpec("P")
#
#
#
#
# class Fn(Generic[R, P]):
# def __init__(self, f: Callable[P, R]):
# self.f = f
#
#
# def transform_callable(self) -> Callable[Concatenate[object, P], R]:
# ...

Expand Down
32 changes: 15 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@
name = ""
version = ""
description = ""
authors = [
{name = "laike9m", email = "laike9m@gmail.com"},
]
authors = [{ name = "laike9m", email = "laike9m@gmail.com" }]
dependencies = [
"flask>=3.0.0",
"pyright>=1.1.338",
"flask-sitemapper>=1.7.0",
"markdown>=3.5.1",
"flask-htmx>=0.3.2",
"flask>=3.0.0",
"pyright>=1.1.338",
"flask-sitemapper>=1.7.0",
"markdown>=3.5.1",
"flask-htmx>=0.3.2",
]
requires-python = ">=3.12"
requires-python = "~=3.12"
readme = "README.md"
license = {text = "MIT"}
license = { text = "MIT" }

[tool.pdm]
plugins = ["pdm-autoexport"]
Expand All @@ -24,16 +22,16 @@ dev = "flask --app app run --debug"
test = "pytest -n auto"
run_ruff = "ruff format"
djhtml.cmd = "djhtml --tabwidth 2 templates"
djhtml.env = {PYTHONUTF8 = "1"}
format = {composite = ["run_ruff", "djhtml"]}
djhtml.env = { PYTHONUTF8 = "1" }
format = { composite = ["run_ruff", "djhtml"] }

[tool.pdm.dev-dependencies]
dev = [
"pytest>=7.4.3",
"djhtml>=3.0.6",
"pre-commit>=3.5.0",
"pytest-xdist>=3.3.1",
"ruff>=0.1.14",
"pytest>=7.4.3",
"djhtml>=3.0.6",
"pre-commit>=3.5.0",
"pytest-xdist>=3.3.1",
"ruff>=0.1.14",
]

[[tool.pdm.autoexport]]
Expand Down

0 comments on commit 666df98

Please sign in to comment.