pylint: Fix unhashable-member

https://pylint.pycqa.org/en/latest/user_guide/messages/error/unhashable-member.html:
> Emitted when a dict key or set member is not hashable (i.e. doesn't
define __hash__ method).

https://docs.python.org/3/library/stdtypes.html#dict.update:
> Update the dictionary with the key/value pairs from other, overwriting
existing keys. Return None.
update() accepts either another dictionary object or an iterable of
key/value pairs (as tuples or other iterables of length two). If keyword
arguments are specified, the dictionary is then updated with those
key/value pairs: d.update(red=1, blue=2).

Fixes: https://pagure.io/freeipa/issue/9278
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Stanislav Levin <slev@altlinux.org>
This commit is contained in:
Stanislav Levin 2022-12-19 20:52:50 +03:00 committed by Florence Blanc-Renaud
parent dc8c8a7824
commit bd7b5bf71c

View File

@ -109,8 +109,7 @@ class CAACLTracker(Tracker):
self.attrs.update(self.create_categories)
if self.description:
# pylint: disable=unhashable-member
self.attrs.update({u'description', [self.description]})
self.attrs.update({"description": [self.description]})
self.exists = True