ci: [pre-commit.ci] autoupdate (#289)

* ci: [pre-commit.ci] autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.11.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.9...v0.11.8)
- [github.com/abravalheri/validate-pyproject: v0.23 → v0.24.1](https://github.com/abravalheri/validate-pyproject/compare/v0.23...v0.24.1)

* style: [pre-commit.ci] auto fixes [...]

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
pre-commit-ci[bot]
2025-06-02 16:27:12 -04:00
committed by GitHub
parent 935025eacc
commit 788d0f0325
3 changed files with 8 additions and 8 deletions

View File

@@ -5,14 +5,14 @@ ci:
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.9
rev: v0.11.8
hooks:
- id: ruff
args: [--fix, --unsafe-fixes]
- id: ruff-format
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
rev: v0.24.1
hooks:
- id: validate-pyproject

View File

@@ -132,7 +132,7 @@ class IconOpts:
def dict(self) -> IconOptionDict:
# not using asdict due to pickle errors on animation
d = {k: v for k, v in vars(self).items() if v is not _Unset}
return cast(IconOptionDict, d)
return cast("IconOptionDict", d)
@dataclass
@@ -151,7 +151,7 @@ class _IconOptions:
def dict(self) -> IconOptionDict:
# not using asdict due to pickle errors on animation
return cast(IconOptionDict, vars(self))
return cast("IconOptionDict", vars(self))
class _QFontIconEngine(QIconEngine):
@@ -167,7 +167,7 @@ class _QFontIconEngine(QIconEngine):
@property
def _default_opts(self) -> _IconOptions:
return cast(_IconOptions, self._opts[QIcon.State.Off][QIcon.Mode.Normal])
return cast("_IconOptions", self._opts[QIcon.State.Off][QIcon.Mode.Normal])
def _add_opts(self, state: QIcon.State, mode: QIcon.Mode, opts: IconOpts) -> None:
self._opts[state][mode] = self._default_opts._update(opts)
@@ -358,7 +358,7 @@ class QFontIconStore(QObject):
def __init__(self, parent: QObject | None = None) -> None:
super().__init__(parent=parent)
if tuple(cast(str, QT_VERSION).split(".")) < ("6", "0"):
if tuple(cast("str", QT_VERSION).split(".")) < ("6", "0"):
# QT6 drops this
QApplication.setAttribute(Qt.ApplicationAttribute.AA_UseHighDpiPixmaps)
@@ -480,7 +480,7 @@ class QFontIconStore(QObject):
# in Qt6, everything becomes a static member
QFd: QFontDatabase | type[QFontDatabase] = (
QFontDatabase()
if tuple(cast(str, QT_VERSION).split(".")) < ("6", "0")
if tuple(cast("str", QT_VERSION).split(".")) < ("6", "0")
else QFontDatabase
)

View File

@@ -10,7 +10,7 @@ class _IntMixin:
self._singleStep = 1
def _type_cast(self, value) -> int:
return int(round(value))
return round(value)
class _FloatMixin: