Skip to content

Commit

Permalink
chore(ruff): suppress combine branches with one or expression
Browse files Browse the repository at this point in the history
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 ...)
  • Loading branch information
rouilj committed Dec 11, 2024
1 parent 138fd59 commit 16a750d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions roundup/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2645,15 +2645,15 @@ def format_dispatch_output(self, accept_mime_type, output,
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
Expand Down

0 comments on commit 16a750d

Please sign in to comment.