Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

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

Anders Kaseorg9fdc0eeb8ec0
diff --git a/zerver/lib/scim.py b/zerver/lib/scim.py
index affad22b2d4..7da62f83317 100644
--- a/zerver/lib/scim.py
+++ b/zerver/lib/scim.py
@@ -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: