changeset 8205:4993e122235e

chore(ruff): suppress combine branches with one or expression I want to keep the comment on datetime and expressing the whole thing as on big or statement would prevent that. Also it reads better since I can't get formatting of multiple or statemnts to occur one element per line. if (a or b or c or ...): wants to be reformated to (a or b or ...)
author John Rouillard <rouilj@ieee.org>
date Wed, 11 Dec 2024 15:18:36 -0500
parents 85d2a04e208a
children 8656bd1cf1f1
files roundup/rest.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/roundup/rest.py	Wed Dec 11 15:11:54 2024 -0500
+++ b/roundup/rest.py	Wed Dec 11 15:18:36 2024 -0500
@@ -2645,15 +2645,15 @@
                 import collections
                 for key, val in output['error'].items():
                     if isinstance(val, numbers.Number) or type(val) in \
-                       (str, unicode):
+                       (str, unicode):  # noqa: SIM114
                         pass
-                    elif hasattr(val, 'isoformat'):  # datetime
+                    elif hasattr(val, 'isoformat'):  # datetime # noqa: SIM114
                         pass
-                    elif type(val) is bool:
+                    elif type(val) is bool:  # noqa: SIM114
                         pass
-                    elif isinstance(val, dict):
+                    elif isinstance(val, dict):  # noqa: SIM114
                         pass
-                    elif isinstance(val, collections.Iterable):
+                    elif isinstance(val, collections.Iterable):  # noqa: SIM114
                         pass
                     elif val is None:
                         pass

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