Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 8192:b4d7f9358ba6
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.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 11 Dec 2024 13:29:11 -0500 |
| parents | 04c10e2189a5 |
| children | f5d6dc28d571 |
comparison
equal
deleted
inserted
replaced
| 8191:30818cc18058 | 8192:b4d7f9358ba6 |
|---|---|
| 1394 return True | 1394 return True |
| 1395 # Block use of * when origin match is used for | 1395 # Block use of * when origin match is used for |
| 1396 # allowing credentials. See: | 1396 # allowing credentials. See: |
| 1397 # https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | 1397 # https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS |
| 1398 # under Credentials Requests and Wildcards | 1398 # under Credentials Requests and Wildcards |
| 1399 if (allowed_origins and allowed_origins[0] == '*' | 1399 return (allowed_origins and allowed_origins[0] == '*' |
| 1400 and not credentials): | 1400 and not credentials) |
| 1401 return True | |
| 1402 | 1401 |
| 1403 return False | 1402 return False |
| 1404 | 1403 |
| 1405 def is_referer_header_ok(self, api=False): | 1404 def is_referer_header_ok(self, api=False): |
| 1406 referer = self.env['HTTP_REFERER'] | 1405 referer = self.env['HTTP_REFERER'] |
