Skip to content

Commit cc4517d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 41ac97a commit cc4517d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

changelog.d/1457.breaking.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Class-level `kw_only=True` behavior is now consistent with `dataclasses`.
22

3-
Previously, a class that sets `kw_only=True` makes all attributes keyword-only,
4-
including those from base classes. If an attribute sets `kw_only=False`, that
3+
Previously, a class that sets `kw_only=True` makes all attributes keyword-only,
4+
including those from base classes. If an attribute sets `kw_only=False`, that
55
setting is ignored, and it is still made keyword-only.
66

77
Now, only the attributes defined in that class that doesn't explicitly set
@@ -22,7 +22,7 @@ class Subclass(Base):
2222

2323
Here, we have a `kw_only=True` attrs class (`Base`) with an attribute that sets
2424
`kw_only=False` and has a default (`Base.b`), and then create a subclass (`Subclass`)
25-
with required arguments (`Subclass.c`). Previously this would work, since it
25+
with required arguments (`Subclass.c`). Previously this would work, since it
2626
would make `Base.b` keyword-only, but now this fails since `Base.b` is positional, and
27-
we have a required positional argument (`Subclass.c`) following another argument with
28-
defaults.
27+
we have a required positional argument (`Subclass.c`) following another argument with
28+
defaults.

0 commit comments

Comments
 (0)