Skip to content

Commit 768a078

Browse files
Work around ruff bug (?)
UP006 Use `tuple` instead of `Tuple` for type annotation UP035 `typing.Tuple` is deprecated, use `tuple` instead UP036 Version block is outdated for minimum Python version The minimum Python version is Python 3.8. From pyproject.toml: requires-python = ">=3.8" Yet, ruff somehow thinks the target is Python 3.9.
1 parent 84f0922 commit 768a078

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

backend/src/hatchling/builders/wheel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import zipfile
1010
from functools import cached_property
1111
from io import StringIO
12-
from typing import TYPE_CHECKING, Any, Callable, NamedTuple, Tuple, cast
12+
from typing import TYPE_CHECKING, Any, Callable, NamedTuple, Tuple, cast # noqa: UP035
1313

1414
from hatchling.__about__ import __version__
1515
from hatchling.builders.config import BuilderConfig
@@ -35,7 +35,7 @@
3535
from hatchling.builders.plugin.interface import IncludedFile
3636

3737

38-
TIME_TUPLE = Tuple[int, int, int, int, int, int]
38+
TIME_TUPLE = Tuple[int, int, int, int, int, int] # noqa: UP006
3939

4040

4141
class FileSelectionOptions(NamedTuple):

backend/src/hatchling/version/scheme/standard.py

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

3-
from typing import TYPE_CHECKING, Any, Tuple, cast
3+
from typing import TYPE_CHECKING, Any, Tuple, cast # noqa: UP035
44

55
from hatchling.version.scheme.plugin.interface import VersionSchemeInterface
66

@@ -95,4 +95,4 @@ def update_release(original_version: Version, new_release_parts: list[int]) -> t
9595
def parse_letter_version(*args: Any, **kwargs: Any) -> tuple[str, int]:
9696
from packaging.version import _parse_letter_version # noqa: PLC2701
9797

98-
return cast(Tuple[str, int], _parse_letter_version(*args, **kwargs))
98+
return cast(Tuple[str, int], _parse_letter_version(*args, **kwargs)) # noqa: UP006

src/hatch/project/frontend/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def get_core_metadata(self, *, output_dir: str, project_root: str) -> str:
295295
)
296296

297297

298-
if sys.version_info[:2] >= (3, 9):
298+
if sys.version_info[:2] >= (3, 9): # noqa: UP036
299299

300300
@cache
301301
def hook_caller_script() -> str:

0 commit comments

Comments
 (0)