mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Replace cmp option with eq and order (#31423)
This commit is contained in:
parent
787faaa508
commit
744ae82933
@ -31,22 +31,28 @@ class User:
|
|||||||
"""A user."""
|
"""A user."""
|
||||||
|
|
||||||
name = attr.ib(type=Optional[str])
|
name = attr.ib(type=Optional[str])
|
||||||
perm_lookup = attr.ib(type=perm_mdl.PermissionLookup, cmp=False)
|
perm_lookup = attr.ib(type=perm_mdl.PermissionLookup, eq=False, order=False)
|
||||||
id = attr.ib(type=str, factory=lambda: uuid.uuid4().hex)
|
id = attr.ib(type=str, factory=lambda: uuid.uuid4().hex)
|
||||||
is_owner = attr.ib(type=bool, default=False)
|
is_owner = attr.ib(type=bool, default=False)
|
||||||
is_active = attr.ib(type=bool, default=False)
|
is_active = attr.ib(type=bool, default=False)
|
||||||
system_generated = attr.ib(type=bool, default=False)
|
system_generated = attr.ib(type=bool, default=False)
|
||||||
|
|
||||||
groups = attr.ib(type=List[Group], factory=list, cmp=False)
|
groups = attr.ib(type=List[Group], factory=list, eq=False, order=False)
|
||||||
|
|
||||||
# List of credentials of a user.
|
# List of credentials of a user.
|
||||||
credentials = attr.ib(type=List["Credentials"], factory=list, cmp=False)
|
credentials = attr.ib(type=List["Credentials"], factory=list, eq=False, order=False)
|
||||||
|
|
||||||
# Tokens associated with a user.
|
# Tokens associated with a user.
|
||||||
refresh_tokens = attr.ib(type=Dict[str, "RefreshToken"], factory=dict, cmp=False)
|
refresh_tokens = attr.ib(
|
||||||
|
type=Dict[str, "RefreshToken"], factory=dict, eq=False, order=False
|
||||||
|
)
|
||||||
|
|
||||||
_permissions = attr.ib(
|
_permissions = attr.ib(
|
||||||
type=Optional[perm_mdl.PolicyPermissions], init=False, cmp=False, default=None
|
type=Optional[perm_mdl.PolicyPermissions],
|
||||||
|
init=False,
|
||||||
|
eq=False,
|
||||||
|
order=False,
|
||||||
|
default=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user