Skip to content

Commit d4631ac

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent cce8669 commit d4631ac

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mypyc/irbuild/util.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations
44

55
from typing import Any, Final, FrozenSet, Literal, TypedDict
6-
76
from typing_extensions import NotRequired
87

98
from mypy.nodes import (
@@ -33,13 +32,16 @@
3332
from mypy.types import FINAL_DECORATOR_NAMES
3433
from mypyc.errors import Errors
3534

36-
MYPYC_ATTRS: Final[FrozenSet["MypycAttr"]] = frozenset(["native_class", "allow_interpreted_subclasses", "serializable"])
35+
MYPYC_ATTRS: Final[FrozenSet[MypycAttr]] = frozenset(
36+
["native_class", "allow_interpreted_subclasses", "serializable"]
37+
)
3738

3839
DATACLASS_DECORATORS: Final = frozenset(["dataclasses.dataclass", "attr.s", "attr.attrs"])
3940

4041

4142
MypycAttr = Literal["native_class", "allow_interpreted_subclasses", "serializable"]
4243

44+
4345
class MypycAttrs(TypedDict):
4446
native_class: NotRequired[bool]
4547
allow_interpreted_subclasses: NotRequired[bool]
@@ -124,11 +126,9 @@ def get_mypyc_attr_call(d: Expression) -> CallExpr | None:
124126
return d
125127
return None
126128

127-
129+
128130
def get_mypyc_attrs(
129-
stmt: ClassDef | Decorator,
130-
path: str,
131-
errors: Errors,
131+
stmt: ClassDef | Decorator, path: str, errors: Errors
132132
) -> tuple[MypycAttrs, dict[MypycAttr, int]]:
133133
"""Collect all the mypyc_attr attributes on a class definition or a function."""
134134
attrs: MypycAttrs = {}

0 commit comments

Comments
 (0)