aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2021-09-03 22:40:38 +0100
committerGravatar Joe Banks <[email protected]>2021-09-03 22:40:38 +0100
commit6bd72f73b761264032907530a9ab1d4c4fa0e97f (patch)
tree35aa55175291f40800946ad7f5747a83894fa181
parentAdd gunicorn.conf.py with Prometheus specific settings (diff)
Ignore gunicorn configuration from flake8
-rw-r--r--.flake82
-rw-r--r--gunicorn.conf.py9
2 files changed, 8 insertions, 3 deletions
diff --git a/.flake8 b/.flake8
index 6690af3e..e665771f 100644
--- a/.flake8
+++ b/.flake8
@@ -3,7 +3,7 @@ max-line-length=100
docstring-convention=all
import-order-style=pycharm
application_import_names=pydis_site
-exclude=__pycache__, venv, .venv, **/migrations/**, .cache/
+exclude=__pycache__, venv, .venv, **/migrations/**, .cache/, gunicorn.conf.py
ignore=
B311,W503,E226,S311,T000
# Missing Docstrings
diff --git a/gunicorn.conf.py b/gunicorn.conf.py
index c60b64eb..4930ae5b 100644
--- a/gunicorn.conf.py
+++ b/gunicorn.conf.py
@@ -1,5 +1,10 @@
-# Code taken from https://github.com/prometheus/client_python#multiprocess-mode-eg-gunicorn
+"""
+Configuration file for gunicorn.
+
+Code taken from https://github.com/prometheus/client_python#multiprocess-mode-eg-gunicorn
+"""
from prometheus_client import multiprocess
-def child_exit(server, worker):
+
+def child_exit(server, worker) -> None:
multiprocess.mark_process_dead(worker.pid)