Use PEP 526 syntax with NamedTuples (#33081)
This commit is contained in:
1 parent
e87fab6b5f
commit
ffc9bcb4d7
4 files changed
+41
-38
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user