diff roundup/rest.py @ 8197:5b8d1cb290cb

chore(ruff): replace 'x == y or x == z' with 'x in [y,z]'
author John Rouillard <rouilj@ieee.org>
date Wed, 11 Dec 2024 13:53:39 -0500
parents 94999f850fd6
children de6b02c23ee9
line wrap: on
line diff
--- a/roundup/rest.py	Wed Dec 11 13:46:48 2024 -0500
+++ b/roundup/rest.py	Wed Dec 11 13:53:39 2024 -0500
@@ -818,7 +818,7 @@
                 page[key] = value
             elif key == "@verbose":
                 verbose = int(value)
-            elif key == "@fields" or key == "@attrs":
+            elif key in ["@fields", "@attrs"]:
                 f = value.split(",")
                 if len(f) == 1:
                     f = value.split(":")
@@ -1118,7 +1118,7 @@
         for form_field in input_payload.value:
             key = form_field.name
             value = form_field.value
-            if key == "@fields" or key == "@attrs":
+            if key in ["@fields", "@attrs"]:
                 if props is None:
                     props = set()
                 # support , or : separated elements

Roundup Issue Tracker: http://roundup-tracker.org/