Use PEP 526 syntax with NamedTuples (#33081)

This commit is contained in:
Ville Skyttä authored and GitHub committed 2020-03-21 11:18:32 +02:00
1 parent e87fab6b5f
commit ffc9bcb4d7
4 files changed
+41 -38

No files matched your search

+5 -1
View File
@@ -123,4 +123,8 @@ class Credentials:
is_new = attr.ib(type=bool, default=True)
UserMeta = NamedTuple("UserMeta", [("name", Optional[str]), ("is_active", bool)])
class UserMeta(NamedTuple):
"""User metadata."""
name: Optional[str]
is_active: bool