diff --git a/src/attr/_compat.py b/src/attr/_compat.py index f84c6c8e..efd1eb52 100644 --- a/src/attr/_compat.py +++ b/src/attr/_compat.py @@ -20,7 +20,7 @@ else: if PY2: from UserDict import IterableUserDict - from collections import Mapping, Sequence # noqa + from collections import Mapping, Sequence # We 'bundle' isclass instead of using inspect as importing inspect is # fairly expensive (order of 10-15 ms for a modern machine in 2016) diff --git a/tests/test_funcs.py b/tests/test_funcs.py index 796d0d99..eeef8bf2 100644 --- a/tests/test_funcs.py +++ b/tests/test_funcs.py @@ -233,14 +233,14 @@ class TestAsTuple(object): elif isinstance(field_val, (list, tuple)): # This field holds a sequence of something. expected_type = type(obj_tuple[index]) - assert type(field_val) is expected_type # noqa: E721 + assert type(field_val) is expected_type for obj_e, obj_tuple_e in zip(field_val, obj_tuple[index]): if has(obj_e.__class__): assert_proper_col_class(obj_e, obj_tuple_e) elif isinstance(field_val, dict): orig = field_val tupled = obj_tuple[index] - assert type(orig) is type(tupled) # noqa: E721 + assert type(orig) is type(tupled) for obj_e, obj_tuple_e in zip( orig.items(), tupled.items() ): diff --git a/tests/test_slots.py b/tests/test_slots.py index fab28fa3..caa5552e 100644 --- a/tests/test_slots.py +++ b/tests/test_slots.py @@ -40,7 +40,7 @@ class C1(object): if not PY2: def my_class(self): - return __class__ # NOQA: F821 + return __class__ def my_super(self): """Just to test out the no-arg super.""" @@ -66,7 +66,7 @@ class C1Slots(object): if not PY2: def my_class(self): - return __class__ # NOQA: F821 + return __class__ def my_super(self): """Just to test out the no-arg super.""" @@ -367,12 +367,12 @@ class TestClosureCellRewriting(object): @attr.s class C2(C1): def my_subclass(self): - return __class__ # NOQA: F821 + return __class__ @attr.s class C2Slots(C1Slots): def my_subclass(self): - return __class__ # NOQA: F821 + return __class__ non_slot_instance = C2(x=1, y="test") slot_instance = C2Slots(x=1, y="test") @@ -400,7 +400,7 @@ class TestClosureCellRewriting(object): class C: @classmethod def clsmethod(cls): - return __class__ # noqa: F821 + return __class__ assert C.clsmethod() is C @@ -408,7 +408,7 @@ class TestClosureCellRewriting(object): class D: @staticmethod def statmethod(): - return __class__ # noqa: F821 + return __class__ assert D.statmethod() is D