Mercurial > p > roundup > code
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 8196:94999f850fd6 | 8197:5b8d1cb290cb |
|---|---|
| 816 key = key[6:] | 816 key = key[6:] |
| 817 value = int(value) | 817 value = int(value) |
| 818 page[key] = value | 818 page[key] = value |
| 819 elif key == "@verbose": | 819 elif key == "@verbose": |
| 820 verbose = int(value) | 820 verbose = int(value) |
| 821 elif key == "@fields" or key == "@attrs": | 821 elif key in ["@fields", "@attrs"]: |
| 822 f = value.split(",") | 822 f = value.split(",") |
| 823 if len(f) == 1: | 823 if len(f) == 1: |
| 824 f = value.split(":") | 824 f = value.split(":") |
| 825 display_props.update(self.transitive_props(class_name, f)) | 825 display_props.update(self.transitive_props(class_name, f)) |
| 826 elif key == "@sort": | 826 elif key == "@sort": |
| 1116 protected = False | 1116 protected = False |
| 1117 verbose = 1 | 1117 verbose = 1 |
| 1118 for form_field in input_payload.value: | 1118 for form_field in input_payload.value: |
| 1119 key = form_field.name | 1119 key = form_field.name |
| 1120 value = form_field.value | 1120 value = form_field.value |
| 1121 if key == "@fields" or key == "@attrs": | 1121 if key in ["@fields", "@attrs"]: |
| 1122 if props is None: | 1122 if props is None: |
| 1123 props = set() | 1123 props = set() |
| 1124 # support , or : separated elements | 1124 # support , or : separated elements |
| 1125 f = value.split(",") | 1125 f = value.split(",") |
| 1126 if len(f) == 1: | 1126 if len(f) == 1: |
