Skip to content

Commit 8cfd522

Browse files
authored
refactor: apply future annotations (#300)
1 parent 263a598 commit 8cfd522

File tree

13 files changed

+485
-676
lines changed

13 files changed

+485
-676
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
os: [ubuntu-latest, windows-latest, macos-latest]
1616

1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v6
1919

2020
- name: Setup PDM
2121
uses: pdm-project/setup-pdm@v4

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v6
1515
with:
1616
fetch-depth: 0
1717

18-
- uses: actions/setup-node@v4
18+
- uses: actions/setup-node@v6
1919
with:
2020
node-version: 20
2121

@@ -24,7 +24,7 @@ jobs:
2424
env:
2525
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2626

27-
- uses: actions/setup-python@v5
27+
- uses: actions/setup-python@v6
2828
with:
2929
python-version: "3.11"
3030

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ci:
44
exclude: ^src/pdm/backend/_vendor
55
repos:
66
- repo: https://github.com/astral-sh/ruff-pre-commit
7-
rev: 'v0.14.10'
7+
rev: 'v0.15.8'
88
hooks:
99
- id: ruff-check
1010
args: [--fix, --exit-non-zero-on-fix, --show-fixes]

pdm.lock

Lines changed: 462 additions & 653 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ classifiers = [
2424
"Programming Language :: Python :: 3.11",
2525
"Programming Language :: Python :: 3.12",
2626
"Programming Language :: Python :: 3.13",
27+
"Programming Language :: Python :: 3.14",
2728
]
2829

2930
dependencies = [
@@ -42,7 +43,7 @@ backend-path = ["src"]
4243

4344
[tool.ruff]
4445
src = ["src"]
45-
target-version = "py38"
46+
target-version = "py39"
4647
exclude = ["tests/fixtures"]
4748

4849
[tool.ruff.lint]
@@ -101,7 +102,6 @@ test = [
101102
dev = [
102103
"editables>=0.3",
103104
"pre-commit>=2.21.0",
104-
"vendoring>=1.2.0; python_version ~= \"3.8\"",
105105
]
106106
docs = [
107107
"mkdocs>=1.4.2",

src/pdm/backend/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
from __future__ import annotations
66

7+
from collections.abc import Mapping
78
from pathlib import Path
8-
from typing import Any, Mapping
9+
from typing import Any
910

1011

1112
def get_requires_for_build_wheel(

src/pdm/backend/base.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,10 @@
44
import os
55
import shutil
66
import sys
7+
from collections.abc import Iterable, Mapping
78
from fnmatch import fnmatch
89
from pathlib import Path
9-
from typing import (
10-
TYPE_CHECKING,
11-
Any,
12-
Iterable,
13-
Literal,
14-
Mapping,
15-
TypeVar,
16-
cast,
17-
)
10+
from typing import TYPE_CHECKING, Any, Literal, TypeVar, cast
1811

1912
from pdm.backend._vendor.pyproject_metadata import StandardMetadata
2013
from pdm.backend.config import Config

src/pdm/backend/hooks/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from __future__ import annotations
22

33
import dataclasses
4+
from collections.abc import Iterable
45
from pathlib import Path
5-
from typing import TYPE_CHECKING, Any, Iterable
6+
from typing import TYPE_CHECKING, Any
67

78
from pdm.backend.config import Config
89

src/pdm/backend/intree.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from __future__ import annotations
22

33
import sys
4-
from typing import Any, Mapping
4+
from collections.abc import Mapping
5+
from typing import Any
56

67
from pdm.backend import build_editable as build_editable
78
from pdm.backend import build_sdist as build_sdist

src/pdm/backend/sdist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
import os
44
import tarfile
5+
from collections.abc import Iterable
56
from copy import copy
67
from io import BytesIO
78
from pathlib import Path
89
from posixpath import join as pjoin
9-
from typing import Iterable
1010

1111
from pdm.backend._vendor.packaging.utils import canonicalize_name
1212
from pdm.backend.base import Builder

0 commit comments

Comments
 (0)