Skip to content

Commit 941497c

Browse files
authored
Update ruff to 0.9.6 (#2507)
1 parent bda1956 commit 941497c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
args: [--fix=lf]
1818
- id: check-case-conflict
1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.9.4
20+
rev: v0.9.6
2121
hooks:
2222
- id: ruff
2323
args: ["--fix", "--exit-non-zero-on-fix"]

django-stubs/db/models/query.pyi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ from typing_extensions import Self, TypeAlias, TypeVar, deprecated
1313
_T = TypeVar("_T", covariant=True)
1414
_Model = TypeVar("_Model", bound=Model, covariant=True)
1515
_Row = TypeVar("_Row", covariant=True, default=_Model) # ONLY use together with _Model
16-
_QS = TypeVar("_QS", bound=_QuerySet)
1716
_TupleT = TypeVar("_TupleT", bound=tuple[Any, ...], covariant=True)
1817

1918
MAX_GET_RESULTS: int
@@ -60,7 +59,7 @@ class QuerySet(Generic[_Model, _Row], Iterable[_Row], Sized):
6059
def as_manager(cls) -> Manager[_Model]: ...
6160
def __len__(self) -> int: ...
6261
def __bool__(self) -> bool: ...
63-
def __class_getitem__(cls: type[_QS], item: type[_Model]) -> type[_QS]: ...
62+
def __class_getitem__(cls, item: type[_Model]) -> Self: ...
6463
def __getstate__(self) -> dict[str, Any]: ...
6564
# Technically, the other QuerySet must be of the same type _T, but _T is covariant
6665
def __and__(self, other: QuerySet[_Model, _Row]) -> Self: ...
@@ -228,7 +227,7 @@ class RawQuerySet(Iterable[_Model], Sized):
228227
def using(self, alias: str | None) -> RawQuerySet[_Model]: ...
229228

230229
# Deprecated alias of QuerySet, for compatibility only.
231-
_QuerySet: TypeAlias = QuerySet
230+
_QuerySet: TypeAlias = QuerySet # noqa: PYI047
232231

233232
class Prefetch:
234233
prefetch_through: str

0 commit comments

Comments
 (0)