mirror of
https://github.com/chubin/cheat.sh.git
synced 2024-11-26 22:45:38 +03:00
Move 'not'
I think that this small change makes the code somewhat more readable. Logic: not any([ b1, b2, b3, ... ]) == all([ not b1, not b2, not b3, ... ])
This commit is contained in:
parent
6f36a5a360
commit
b8ab35db77
@ -49,7 +49,7 @@ def is_html_needed(user_agent):
|
||||
Basing on `user_agent`, return whether it needs HTML or ANSI
|
||||
"""
|
||||
plaintext_clients = ['curl', 'wget', 'fetch', 'httpie', 'lwp-request', 'python-requests']
|
||||
return not any([x in user_agent for x in plaintext_clients])
|
||||
return all([x not in user_agent for x in plaintext_clients])
|
||||
|
||||
@app.route('/files/<path:path>')
|
||||
def send_static(path):
|
||||
|
Loading…
Reference in New Issue
Block a user