Skip to content

Commit d1b4cab

Browse files
[pre-commit.ci] pre-commit autoupdate (#245)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.10 → v0.11.0](astral-sh/ruff-pre-commit@v0.9.10...v0.11.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 4cb2185 commit d1b4cab

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repos:
2626
args: [-w, -L, "THIRDPARTY"]
2727

2828
- repo: https://github.com/astral-sh/ruff-pre-commit
29-
rev: v0.9.10 # Ruff version
29+
rev: v0.11.0 # Ruff version
3030
hooks:
3131
- id: ruff
3232
args: [--fix, --show-fixes]

src/validate_pyproject/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(self, plugins: Sequence["PluginProtocol"] = ()):
9898
self._schemas: Dict[str, Tuple[str, str, Schema]] = {}
9999
# (which part of the TOML, who defines, schema)
100100

101-
top_level = typing.cast(dict, load(TOP_LEVEL_SCHEMA)) # Make it mutable
101+
top_level = typing.cast("dict", load(TOP_LEVEL_SCHEMA)) # Make it mutable
102102
self._spec_version: str = top_level["$schema"]
103103
top_properties = top_level["properties"]
104104
tool_properties = top_properties["tool"].setdefault("properties", {})
@@ -278,7 +278,7 @@ def __call__(self, pyproject: T) -> T:
278278
self.schema, self.handlers, dict(self.formats), use_default=False
279279
)
280280
fn = partial(compiled, custom_formats=self._format_validators)
281-
self._cache = typing.cast(ValidationFn, fn)
281+
self._cache = typing.cast("ValidationFn", fn)
282282

283283
with detailed_errors():
284284
self._cache(pyproject)

src/validate_pyproject/plugins/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def __repr__(self) -> str:
115115

116116

117117
if typing.TYPE_CHECKING:
118-
_: PluginProtocol = typing.cast(PluginWrapper, None)
118+
_: PluginProtocol = typing.cast("PluginWrapper", None)
119119

120120

121121
def iterate_entry_points(group: str) -> Iterable[EntryPoint]:
@@ -131,7 +131,7 @@ def iterate_entry_points(group: str) -> Iterable[EntryPoint]:
131131
# The select method was introduced in importlib_metadata 3.9 (and Python 3.10)
132132
# and the previous dict interface was declared deprecated
133133
select = typing.cast(
134-
Callable[..., Iterable[EntryPoint]],
134+
"Callable[..., Iterable[EntryPoint]]",
135135
getattr(entries, "select"), # noqa: B009
136136
) # typecheck gymnastics
137137
return select(group=group)

src/validate_pyproject/remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ def load_store(pyproject_url: str) -> Generator[RemotePlugin, None, None]:
8989
if typing.TYPE_CHECKING:
9090
from .plugins import PluginProtocol
9191

92-
_: PluginProtocol = typing.cast(RemotePlugin, None)
92+
_: PluginProtocol = typing.cast("RemotePlugin", None)

0 commit comments

Comments
 (0)