Skip to content

Commit a7365e6

Browse files
committed
chore(ruff): return/suppress boolen directly
I suppressed one 'if bool: return true else return false' so I could see in codecov that code was returning both true and false.
1 parent 52072e7 commit a7365e6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

roundup/cgi/client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,9 +1396,8 @@ def is_origin_header_ok(self, api=False, credentials=False):
13961396
# allowing credentials. See:
13971397
# https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
13981398
# under Credentials Requests and Wildcards
1399-
if (allowed_origins and allowed_origins[0] == '*'
1400-
and not credentials):
1401-
return True
1399+
return (allowed_origins and allowed_origins[0] == '*'
1400+
and not credentials)
14021401

14031402
return False
14041403

roundup/rest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def check_etag(node, key, etags, classname="Missing", node_id="0",
239239
return False
240240
have_etag_match = True
241241

242-
if have_etag_match:
242+
if have_etag_match: # noqa: SIM103 leave for coverage reports
243243
return True
244244
else:
245245
return False

0 commit comments

Comments
 (0)