scim: Fix PLR1704 Redefining argument with the local name `path`.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-06-27 11:16:37 -07:00 committed by Tim Abbott
parent 77c614e072
commit 9fdc0eeb8e
1 changed files with 5 additions and 5 deletions

View File

@ -229,19 +229,19 @@ class ZulipSCIMUser(SCIMUser):
value = {path: value}
assert isinstance(value, dict)
for path, val in (value or {}).items():
if path.first_path == ("userName", None, None):
for attr_path, val in (value or {}).items():
if attr_path.first_path == ("userName", None, None):
assert isinstance(val, str)
self.change_delivery_email(val)
elif path.first_path == ("name", "formatted", None):
elif attr_path.first_path == ("name", "formatted", None):
# TODO: Add support name_formatted_included=False config like we do
# for updates via PUT.
assert isinstance(val, str)
self.change_full_name(val)
elif path.first_path == ("active", None, None):
elif attr_path.first_path == ("active", None, None):
assert isinstance(val, bool)
self.change_is_active(val)
elif path.first_path == ("role", None, None):
elif attr_path.first_path == ("role", None, None):
assert isinstance(val, str)
self.change_role(val)
else: