Skip to content

Commit d1c83bf

Browse files
refactor: target py312 in ruff config and use type statements for type aliases
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 310721a commit d1c83bf

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎afterpython/ruff.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
src = ["..", "../src"]
1010

1111
line-length = 88
12-
target-version = "py311"
12+
target-version = "py312"
1313

1414
[lint]
1515
# ruff default rules:

‎src/afterpython/_typing.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Literal, TypeAlias
1+
from typing import Literal
22

3-
NodeEnv: TypeAlias = dict[str, str]
3+
type NodeEnv = dict[str, str]
44
tContentType = Literal["doc", "blog", "tutorial", "example", "guide"]

‎src/afterpython/pcu.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from __future__ import annotations
66

7-
from typing import TYPE_CHECKING, NamedTuple, TypeAlias, TypedDict
7+
from typing import TYPE_CHECKING, NamedTuple, TypedDict
88

99
if TYPE_CHECKING:
1010
from tomlkit.toml_document import TOMLDocument
@@ -23,10 +23,10 @@ class Dependency(NamedTuple):
2323
latest_version: Version | None = None
2424

2525

26-
DependencyName: TypeAlias = str
27-
ExtrasName: TypeAlias = str
28-
GroupName: TypeAlias = str
29-
FakeCategoryName: TypeAlias = str
26+
type DependencyName = str
27+
type ExtrasName = str
28+
type GroupName = str
29+
type FakeCategoryName = str
3030
Dependencies = TypedDict(
3131
"Dependencies",
3232
{

‎src/afterpython/templates/ruff-template.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
src = ["..", "../src"]
1010

1111
line-length = 88
12-
target-version = "py311"
12+
target-version = "py312"
1313

1414
[lint]
1515
# ruff default rules:

0 commit comments

Comments
 (0)