fields needs to be imported in examples (#921)
neither attrs as a whole nor field is imported from attrs. Therefore the example using field does not work if one goes through the examples step by step. either import fields from the beginning (as suggested) or in the example using fields. Co-authored-by: Hynek Schlawack <hs@ox.cx>
This commit is contained in:
parent
656ce11bc2
commit
5c040f30e3
|
@ -9,7 +9,7 @@ The simplest possible usage is:
|
|||
|
||||
.. doctest::
|
||||
|
||||
>>> from attrs import define
|
||||
>>> from attrs import define, field
|
||||
>>> @define
|
||||
... class Empty:
|
||||
... pass
|
||||
|
|
Loading…
Reference in New Issue