Skip to content

Commit 5820ce7

Browse files
committed
docs: stress that make_class doesn't validate names
1 parent 06daa1d commit 5820ce7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/attr/_make.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2877,6 +2877,12 @@ def make_class(
28772877
`attrs.define`, you have to pass the hooks yourself: ``make_class(...,
28782878
on_setattr=setters.pipe(setters.convert, setters.validate)``
28792879
2880+
.. warning::
2881+
2882+
It is *your* duty to ensure that the class name and the attribute names
2883+
are valid identifiers. ``make_class()`` will *not* validate them for
2884+
you.
2885+
28802886
Args:
28812887
name (str): The name for the new class.
28822888

0 commit comments

Comments
 (0)