Skip to content

Commit

Permalink
Add typing_example tests
Browse files Browse the repository at this point in the history
  • Loading branch information
asford committed Nov 13, 2022
1 parent aa0c11f commit 95b95d0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/typing_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ class Error2(Exception):
e.args
str(e)

# Field aliases

@attr.s
class AliasExample:
x = attr.ib()
_private = attr.ib(alias="_private")

attr.fields(AliasExample).x.alias
attr.fields(AliasExample)._private.alias

# Converters
# XXX: Currently converters can only be functions so none of this works
Expand Down

0 comments on commit 95b95d0

Please sign in to comment.