Skip to content

Commit

Permalink
upgrade pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Mar 5, 2024
1 parent fee09f4 commit 82857a4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
- id: check-yaml
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
rev: v0.3.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ version = { attr = "_own_version_helper.version"}
[tool.setuptools_scm]

[tool.ruff]
required-version = "0.2.1"
fix = true
lint.select = ["E", "F", "B", "U", "YTT", "C", "DTZ", "PYI", "PT", "I", "FURB", "RUF"]
lint.ignore = ["B028"]
Expand Down
5 changes: 2 additions & 3 deletions src/setuptools_scm/_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" configuration """
"""configuration"""

from __future__ import annotations

Expand Down Expand Up @@ -54,8 +54,7 @@ def _check_tag_regex(value: str | Pattern[str] | None) -> Pattern[str]:
class ParseFunction(Protocol):
def __call__(
self, root: _t.PathT, *, config: Configuration
) -> _t.SCMVERSION | None:
...
) -> _t.SCMVERSION | None: ...


def _check_absolute_root(root: _t.PathT, relative_to: _t.PathT | None) -> str:
Expand Down
6 changes: 2 additions & 4 deletions src/setuptools_scm/_entrypoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ def _call_version_scheme(
entrypoint: str,
given_value: _t.VERSION_SCHEMES,
default: str,
) -> str:
...
) -> str: ...


@overload
Expand All @@ -124,8 +123,7 @@ def _call_version_scheme(
entrypoint: str,
given_value: _t.VERSION_SCHEMES,
default: None,
) -> str | None:
...
) -> str | None: ...


def _call_version_scheme(
Expand Down
6 changes: 2 additions & 4 deletions src/setuptools_scm/_run_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,15 @@ def parse_success(
parse: Callable[[str], PARSE_RESULT],
default: None = None,
error_msg: str | None = None,
) -> PARSE_RESULT | None:
...
) -> PARSE_RESULT | None: ...

@overload
def parse_success(
self,
parse: Callable[[str], PARSE_RESULT],
default: T,
error_msg: str | None = None,
) -> PARSE_RESULT | T:
...
) -> PARSE_RESULT | T: ...

def parse_success(
self,
Expand Down

0 comments on commit 82857a4

Please sign in to comment.