This ain't Markdown

This commit is contained in:
Hynek Schlawack 2021-12-24 14:34:17 +01:00
parent d9ed03a751
commit f329fb6105
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ Never again violate the `single responsibility principle <https://en.wikipedia.o
**Hate type annotations**!? **Hate type annotations**!?
No problem! No problem!
With ``attrs`` types are entirely **optional**. With ``attrs`` types are entirely **optional**.
Simply assign `field()` to the attributes instead of annotating them with types. Simply assign ``field()`` to the attributes instead of annotating them with types.
In case you're wondering: this example uses ``attrs``'s `modern APIs <https://www.attrs.org/en/stable/api.html#next-generation-apis>`_ that have been introduced in version 20.1.0. In case you're wondering: this example uses ``attrs``'s `modern APIs <https://www.attrs.org/en/stable/api.html#next-generation-apis>`_ that have been introduced in version 20.1.0.
The classic APIs (``@attr.s``, ``attr.ib``, ``@attr.attrs``, ``attr.attrib``, and ``attr.dataclass``) will remain indefinitely. The classic APIs (``@attr.s``, ``attr.ib``, ``@attr.attrs``, ``attr.attrib``, and ``attr.dataclass``) will remain indefinitely.