Skip to content

Commit 967ff99

Browse files
authored
Add ClassVar annotations on Migration class attributes (#2530)
See also: - astral-sh/ruff#5243 - #2524 Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
1 parent e8c8679 commit 967ff99

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

django-stubs/db/migrations/migration.pyi

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
from collections.abc import Sequence
2+
from typing import ClassVar
23

34
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
45
from django.db.migrations.operations.base import Operation
56
from django.db.migrations.state import ProjectState
67
from typing_extensions import Self
78

89
class Migration:
9-
operations: Sequence[Operation]
10-
dependencies: Sequence[tuple[str, str]]
11-
run_before: Sequence[tuple[str, str]]
12-
replaces: Sequence[tuple[str, str]]
13-
initial: bool | None
14-
atomic: bool
10+
operations: ClassVar[Sequence[Operation]]
11+
dependencies: ClassVar[Sequence[tuple[str, str]]]
12+
run_before: ClassVar[Sequence[tuple[str, str]]]
13+
replaces: ClassVar[Sequence[tuple[str, str]]]
14+
initial: ClassVar[bool | None]
15+
atomic: ClassVar[bool]
1516
name: str
1617
app_label: str
1718
def __init__(self, name: str, app_label: str) -> None: ...

0 commit comments

Comments
 (0)