diff --git a/README.md b/README.md index 52c5c2a3..d2234033 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,16 @@ After *declaring* your attributes, *attrs* gives you: *without* writing dull boilerplate code again and again and *without* runtime performance penalties. -**Hate type annotations**!? +--- + +This example uses *attrs*'s modern APIs that have been introduced in version 20.1.0, and the *attrs* package import name that has been added in version 21.3.0. +The classic APIs (`@attr.s`, `attr.ib`, plus their serious-business aliases) and the `attr` package import name will remain **indefinitely**. + +Check out [*On The Core API Names*](https://www.attrs.org/en/latest/names.html) for an in-depth explanation! + + +### Hate Type Annotations!? + No problem! Types are entirely **optional** with *attrs*. Simply assign `attrs.field()` to the attributes instead of annotating them with types: @@ -105,13 +114,6 @@ class SomeClass: list_of_numbers = field(factory=list) ``` ---- - -This example uses *attrs*'s modern APIs that have been introduced in version 20.1.0, and the *attrs* package import name that has been added in version 21.3.0. -The classic APIs (`@attr.s`, `attr.ib`, plus their serious-business aliases) and the `attr` package import name will remain **indefinitely**. - -Check out [*On The Core API Names*](https://www.attrs.org/en/latest/names.html) for an in-depth explanation! - ## Data Classes diff --git a/docs/overview.md b/docs/overview.md index 5824f708..27507cda 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -4,7 +4,7 @@ In order to fulfill its ambitious goal of bringing back the joy to writing class ```{include} ../README.md :start-after: 'code-begin -->' -:end-before: '## Project Information' +:end-before: '### Hate Type Annotations!?' ```