Skip to content

Commit 136b784

Browse files
committed
review change: remove walrus operator and shortcut-logic induced bugs
1 parent 8ed9f71 commit 136b784

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

irods/manager/user_manager.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,11 @@ def create(
293293
group_admin=None,
294294
**options,
295295
):
296+
user_zone = options.pop("user_zone", "")
297+
auth_str = options.pop("auth_str", "")
298+
user_type = options.pop("user_type", "rodsgroup")
296299

297-
if (
298-
(user_zone := options.pop("user_zone", "")) != ""
299-
or (auth_str := options.pop("auth_str", "")) != ""
300-
or (user_type := options.pop("user_type", "rodsgroup")) != "rodsgroup"
301-
):
300+
if user_zone != "" or auth_str != "" or user_type != "rodsgroup":
302301
warnings.warn(
303302
"Use of non-default value for auth_str, user_type or user_zone in GroupManager.create is deprecated",
304303
DeprecationWarning,

0 commit comments

Comments
 (0)