From 754fae0699e52dc7d05819c1a3f4c4749e804e4c Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Tue, 1 Oct 2019 15:47:52 +0200 Subject: [PATCH] Clarify that unannotated attributes are ignored too Ref #220 --- src/attr/_make.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/attr/_make.py b/src/attr/_make.py index 02f6e23cf..5bdd46886 100644 --- a/src/attr/_make.py +++ b/src/attr/_make.py @@ -888,7 +888,8 @@ def attrs( ``attr.ib(default=42)``. Passing an instance of `Factory` also works as expected. - Attributes annotated as `typing.ClassVar` are **ignored**. + Attributes annotated as `typing.ClassVar`, and attributes that are + neither annotated nor set to an `attr.ib` are **ignored**. .. _`PEP 526`: https://www.python.org/dev/peps/pep-0526/ :param bool kw_only: Make all attributes keyword-only (Python 3+)