Skip to content

Commit d691a6d

Browse files
committed
Avoid attribute lookups in hot loop
1 parent e79ac4f commit d691a6d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/attr/_make.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,12 @@ def _transform_attrs(
437437
)
438438

439439
fca = Attribute.from_counting_attr
440+
no = ClassProps.KeywordOnly.NO
440441
own_attrs = [
441442
fca(
442443
attr_name,
443444
ca,
444-
kw_only is not ClassProps.KeywordOnly.NO,
445+
kw_only is not no,
445446
anns.get(attr_name),
446447
)
447448
for attr_name, ca in ca_list

0 commit comments

Comments
 (0)