Minor lint fixes

- bump complexity up to 78
- fixed whitespace formatting in piku.py (and legacy copy)
pull/266/head
Eric Walker 2023-01-17 22:33:15 -05:00
rodzic e902c17e94
commit cb38cca13b
3 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -39,4 +39,4 @@ jobs:
# Ignore W605 (https://lintlyci.github.io/Flake8Rules/rules/W605.html) because
# flake8 does not understand escaping dots inside templates for nginx and SSH
# TODO: pare down complexity and line length as we shrink piku core
flake8 . --ignore=W605 --count --max-complexity=76 --max-line-length=255 --statistics
flake8 . --ignore=W605 --count --max-complexity=78 --max-line-length=255 --statistics

Wyświetl plik

@ -919,7 +919,7 @@ def spawn_app(app, deltas={}):
# change any unecessary uWSGI specific directives to standard proxy ones
if 'wsgi' not in workers and 'jwsgi' not in workers:
buffer = buffer.replace("uwsgi_", "proxy_")
# map Cloudflare connecting IP to REMOTE_ADDR
if env.get('NGINX_CLOUDFLARE_ACL', 'false').lower() == 'true':
buffer = buffer.replace("REMOTE_ADDR $remote_addr", "REMOTE_ADDR $http_cf_connecting_ip")

Wyświetl plik

@ -919,7 +919,7 @@ def spawn_app(app, deltas={}):
# change any unecessary uWSGI specific directives to standard proxy ones
if 'wsgi' not in workers and 'jwsgi' not in workers:
buffer = buffer.replace("uwsgi_", "proxy_")
# map Cloudflare connecting IP to REMOTE_ADDR
if env.get('NGINX_CLOUDFLARE_ACL', 'false').lower() == 'true':
buffer = buffer.replace("REMOTE_ADDR $remote_addr", "REMOTE_ADDR $http_cf_connecting_ip")