Mercurial > p > roundup > code
comparison roundup/rest.py @ 8195:beab1ba70d34
chore(ruff): parenthesize "a and b or ..." to enforce/clarify precedence
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 11 Dec 2024 13:36:40 -0500 |
| parents | 2ecd1a871993 |
| children | 94999f850fd6 |
comparison
equal
deleted
inserted
replaced
| 8194:2ecd1a871993 | 8195:beab1ba70d34 |
|---|---|
| 914 if key in filter_props: | 914 if key in filter_props: |
| 915 vals = filter_props[key] | 915 vals = filter_props[key] |
| 916 else: | 916 else: |
| 917 vals = [] | 917 vals = [] |
| 918 for p in value.split(","): | 918 for p in value.split(","): |
| 919 dig = p and p.isdigit() or \ | 919 dig = (p and p.isdigit()) or \ |
| 920 (p[0] in ('-', '+') and p[1:].isdigit()) | 920 (p[0] in ('-', '+') and p[1:].isdigit()) |
| 921 if prop.try_id_parsing and dig: | 921 if prop.try_id_parsing and dig: |
| 922 vals.append(p) | 922 vals.append(p) |
| 923 else: | 923 else: |
| 924 vals.append(linkcls.lookup(p)) | 924 vals.append(linkcls.lookup(p)) |
