Skip to content

Commit 6f16840

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

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

mypyc/irbuild/classdef.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@
6363
handle_non_ext_method,
6464
load_type,
6565
)
66-
from mypyc.irbuild.util import dataclass_type, get_func_def, is_constant, is_dataclass_decorator, is_final_class
66+
from mypyc.irbuild.util import (
67+
dataclass_type,
68+
get_func_def,
69+
is_constant,
70+
is_dataclass_decorator,
71+
is_final_class,
72+
)
6773
from mypyc.primitives.dict_ops import dict_new_op, dict_set_item_op
6874
from mypyc.primitives.generic_ops import (
6975
iter_op,

mypyc/irbuild/util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ def get_mypyc_attrs(stmt: ClassDef | Decorator) -> dict[str, Any]:
127127

128128
def is_extension_class(cdef: ClassDef) -> bool:
129129
if any(
130-
not is_trait_decorator(d) and not is_dataclass_decorator(d) and not get_mypyc_attr_call(d) and not is_final_decorator(d)
130+
not is_trait_decorator(d)
131+
and not is_dataclass_decorator(d)
132+
and not get_mypyc_attr_call(d)
133+
and not is_final_decorator(d)
131134
for d in cdef.decorators
132135
):
133136
return False

0 commit comments

Comments
 (0)