Skip to content

Commit 80f0177

Browse files
committed
formatting fixes
1 parent d4f4587 commit 80f0177

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

src/attr/_make.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,7 @@ def _transform_attrs(
452452

453453
# Overwrite explicitly inherited attributes in `base` with their versions in `own`
454454
base_attrs = [
455-
base_attr
456-
if base_attr.name not in own_attr_map
457-
else own_attr_map[base_attr.name]
458-
for base_attr in base_attrs
455+
own_attr_map.get(base_attr.name, base_attr) for base_attr in base_attrs
459456
]
460457
# Strip explicitly inherited attributes from `own`, as they now live in `base`
461458
own_attrs = [

tests/test_make.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,6 @@ def x_default(self):
988988
class Different:
989989
x = attr.fields(BaseClass).x.reuse(factory=lambda: 5)
990990

991-
print(attr.fields(Different))
992991
assert 5 == Different().x
993992

994993
def test_evolve_validators(self):

0 commit comments

Comments
 (0)