Simplify import

This commit is contained in:
Hynek Schlawack 2021-05-05 10:15:26 +02:00
parent 01aa333005
commit fc0d60e370
1 changed files with 2 additions and 2 deletions

View File

@ -45,11 +45,11 @@ Common examples of such objects are `NumPy arrays <https://github.com/python-att
To save you unnecessary boilerplate, ``attrs`` comes with the `attr.cmp_using` helper to create such functions.
For NumPy arrays it would look like this::
import numpy as np
import numpy
@attr.s(order=False)
class C:
an_array = attr.ib(eq=attr.cmp_using(eq=np.array_equal))
an_array = attr.ib(eq=attr.cmp_using(eq=numpy.array_equal))
.. warning::