Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Sep 5, 2020
1 parent 482e912 commit 57c3ff4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/attr/_next_gen.py
Expand Up @@ -82,7 +82,7 @@ def wrap(cls):
"""
nonlocal frozen, on_setattr

had_on_setattr = on_setattr is not None
had_on_setattr = on_setattr not in (None, setters.NO_OP)

# By default, mutable classes validate on setattr.
if frozen is False and on_setattr is None:
Expand All @@ -98,7 +98,6 @@ def wrap(cls):
"(frozen-ness was inherited)."
)

frozen = True
on_setattr = setters.NO_OP
break

Expand Down
3 changes: 2 additions & 1 deletion tests/test_next_gen.py
@@ -1,6 +1,7 @@
"""
Python 3-only integration tests for provisional next generation APIs.
"""

import re

import pytest
Expand Down Expand Up @@ -189,7 +190,7 @@ class A:
class B(A):
b: int

@attr.define
@attr.define(on_setattr=attr.setters.NO_OP)
class C(B):
c: int

Expand Down

0 comments on commit 57c3ff4

Please sign in to comment.