Skip to content

Commit

Permalink
chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.8…
Browse files Browse the repository at this point in the history
….1 (#433)

* chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.8.1

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
renovate[bot] and pre-commit-ci[bot] authored Nov 29, 2024
1 parent a49ec6f commit 34a3b68
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
hooks:
- id: yamllint
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
rev: v0.8.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
4 changes: 2 additions & 2 deletions translation_finder/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

import sys
from argparse import ArgumentParser
from io import TextIOWrapper
from typing import TYPE_CHECKING, cast

from .finder import Finder, PathMockType

if TYPE_CHECKING:
from io import TextIOWrapper
from pathlib import PurePath

from translation_finder.discovery.base import BaseDiscovery
Expand Down Expand Up @@ -56,7 +56,7 @@ def discover(

def cli(stdout: TextIOWrapper | None = None, args: list[str] | None = None) -> int:
"""Execution entry point."""
stdout = stdout if stdout is not None else cast(TextIOWrapper, sys.stdout)
stdout = stdout if stdout is not None else cast("TextIOWrapper", sys.stdout)

parser = ArgumentParser(
description="Weblate translation discovery utility.",
Expand Down
2 changes: 1 addition & 1 deletion translation_finder/discovery/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def _sort_key(self) -> tuple[int, str]:

@property
def match(self) -> ResultDict:
return cast(ResultDict, dict(self.data))
return cast("ResultDict", dict(self.data))

def __lt__(self, other: DiscoveryResult) -> bool:
"""Only method needed for sort."""
Expand Down

0 comments on commit 34a3b68

Please sign in to comment.