Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Addreuse() toAttribute for field evolution#1429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
redruin1 wants to merge7 commits intopython-attrs:main
base:main
Choose a base branch
Loading
fromredruin1:evolve-inherited-fields
Open
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, seehttps://pre-commit.ci
  • Loading branch information
@pre-commit-ci
pre-commit-ci[bot] committedMay 8, 2025
commitd4f45876b991c7313d8e21ed58327bc2a33e5495
4 changes: 2 additions & 2 deletionschangelog.d/pr1429.change.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,7 +27,7 @@ class ChildOrder(Parent):

assert repr(ChildOrder()) == "ChildOrder(y=2, x=3, z=4)"

@define
@define
class ParentOrder(Parent):
x = fields(Parent).y.reuse(default=3, inherited=True)
z = fields(ChildOrder).z.reuse(inherited=True) # `inherited` does nothing here
Expand All@@ -47,4 +47,4 @@ class Child(Parent):
a: str = field(default="test", inherited=True)

assert repr(Child()) == "Child(a='test', b=10)"
```
```

[8]ページ先頭

©2009-2025 Movatter.jp