Skip to content

Commit

Permalink
Tidy typing_example
Browse files Browse the repository at this point in the history
  • Loading branch information
asford committed Nov 13, 2022
1 parent ec4c7c0 commit e2ed777
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/typing_example.py
Expand Up @@ -122,14 +122,14 @@ class Error2(Exception):
# Field aliases


@attr.s
@attrs.define
class AliasExample:
x = attr.ib()
_private = attr.ib(alias="_private")
without_alias: int
_with_alias: int = attr.ib(alias="_with_alias")


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

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

0 comments on commit e2ed777

Please sign in to comment.