Skip to content

Support Python 3.6 attribute annotations. #151

@Tinche

Description

@Tinche

Python 3.6 allows this:

@attr.s
class A:
    a: int = attr.ib()

The annotation is available as A.__annotations__['a']. So, I suggest that on 3.6, we add an attribute to attr.Attribute called annotation and expose these values there if they are present.

This might be an easy one for someone looking to get started contributing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions