Skip to content

Commit

Permalink
Update changelog
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
  • Loading branch information
aarnphm committed Nov 17, 2023
1 parent 9c8c954 commit 6e67abe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions changelog.d/1203.feature.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Added `namespaces` to `attr.make_class` to provide additional attributes
Added `class_body` to `attr.make_class` to provide additional attributes
for newly created class

```python
Expand All @@ -11,7 +11,7 @@ class A:
def new_echo(cls, *something: int) -> tuple[int, ...]:
return something

B = attr.make_class("B", bases=(A,), namespaces={"echo": classmethod(new_echo)})
B = attr.make_class("B", bases=(A,), class_body={"echo": classmethod(new_echo)})

B.echo(1, 2, 3)
```

0 comments on commit 6e67abe

Please sign in to comment.