We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37bc6ef commit be899e8Copy full SHA for be899e8
tests/test_make.py
@@ -1738,6 +1738,12 @@ class TestInitAlias:
1738
"""
1739
1740
def test_default_and_specify(self):
1741
+ """
1742
+ alias is present on the Attributes returned from attr.fields.
1743
+
1744
+ If left unspecified, it defaults to standard private-attribute
1745
+ handling. If specified, it passes through the explicit alias.
1746
1747
1748
# alias is None by default on _CountingAttr
1749
default_counting = attr.ib()
@@ -1796,6 +1802,10 @@ class Cases:
1796
1802
assert example.__dunder_override__ == 6
1797
1803
1798
1804
def test_evolve(self):
1805
1806
+ attr.evolve uses Attribute.alias to determine parameter names.
1807
1808
1799
1809
@attr.s
1800
1810
class EvolveCase:
1801
1811
_override = attr.ib(alias="_override")
0 commit comments