Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Spike `alias` implementation. * Move default alias init to after field_transformer. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fixup docs. * Update docs/extending.rst * Pre-commit fixes * Partially fix doctest * Add test docstrings. * Add typing_example tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Tidy typing_example * Add note in init.rst on private aliases * Add alias example to examples.rst * Assert to comment * Add changelog entry * Fixup doc error * Tidy dataclass_transform docs * Lil' spice for the changelog. * Fix doctest * Update extending.rst * Make alias introspection more explicit * Update src/attr/_make.py Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Hynek Schlawack <hs@ox.cx>
- Loading branch information
1 parent
69aca6c
commit ee3ecb1
Showing
14 changed files
with
254 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
``attrs.field`` now supports an ``alias`` option for explicit ``__init__`` argument names. | ||
|
||
Get ``__init__`` signatures matching any taste, peculiar or plain! | ||
The `PEP 681 compatible <https://peps.python.org/pep-0681/#field-specifier-parameters>`_ ``alias`` option can be use to override private attribute name mangling, | ||
or add other arbitrary field argument name overrides. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.