mirror of
https://github.com/kennethreitz/responder.git
synced 2026-06-05 06:46:14 +00:00
Simplify status code category check
Replace all([(x >= y), (x < z)]) with chained comparison x <= y < z. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -85,7 +85,7 @@ for number in codes:
|
||||
|
||||
|
||||
def _is_category(category, status_code):
|
||||
return all([(status_code >= category), (status_code < category + 100)])
|
||||
return category <= status_code < category + 100
|
||||
|
||||
|
||||
def is_100(status_code):
|
||||
|
||||
Reference in New Issue
Block a user