File tree 4 files changed +20
-21
lines changed
advanced-variadic-generics
4 files changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def copy(self) -> "MyClass":
14
14
# class MyClass:
15
15
# def __init__(self, x: int) -> None:
16
16
# self.x = x
17
- #
17
+ #
18
18
# # TODO: Fix the type hints of `copy` to make it type check
19
19
# def copy(self) -> MyClass:
20
20
# copied_object = MyClass(x=self.x)
Original file line number Diff line number Diff line change 11
11
# def __add__(self, other: "Array[*Ts]") -> "Array[*Ts]":
12
12
# ...
13
13
14
+
14
15
# For Python >= 3.12
15
16
class Array [* Ts ]:
16
17
def __add__ (self , other : "Array[*Ts]" ) -> "Array[*Ts]" :
Original file line number Diff line number Diff line change 15
15
# # For Python < 3.12
16
16
# R = TypeVar("R")
17
17
# P = ParamSpec("P")
18
- #
19
- #
18
+ #
19
+ #
20
20
# class Fn(Generic[R, P]):
21
21
# def __init__(self, f: Callable[P, R]):
22
22
# self.f = f
23
- #
23
+ #
24
24
# def transform_callable(self) -> Callable[Concatenate[object, P], R]:
25
25
# ...
26
26
Original file line number Diff line number Diff line change 2
2
name = " "
3
3
version = " "
4
4
description = " "
5
- authors = [
6
- {name = " laike9m" , email = " laike9m@gmail.com" },
7
- ]
5
+ authors = [{ name = " laike9m" , email = " laike9m@gmail.com" }]
8
6
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" ,
14
12
]
15
- requires-python = " > =3.12"
13
+ requires-python = " ~ =3.12"
16
14
readme = " README.md"
17
- license = {text = " MIT" }
15
+ license = { text = " MIT" }
18
16
19
17
[tool .pdm ]
20
18
plugins = [" pdm-autoexport" ]
@@ -24,16 +22,16 @@ dev = "flask --app app run --debug"
24
22
test = " pytest -n auto"
25
23
run_ruff = " ruff format"
26
24
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" ] }
29
27
30
28
[tool .pdm .dev-dependencies ]
31
29
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" ,
37
35
]
38
36
39
37
[[tool .pdm .autoexport ]]
You can’t perform that action at this time.
0 commit comments