From 068366b0e93f98e0478b19590800d9856149b9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mervan=20Palm=C3=A9r?= Date: Tue, 19 May 2026 16:38:32 +0200 Subject: [PATCH] Docs: Fix pre-commit formatting issues --- docs/deploying/gunicorn.rst | 26 +++++++++++++------------- docs/tutorial/database.rst | 10 +++++----- docs/tutorial/deploy.rst | 8 ++++---- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/deploying/gunicorn.rst b/docs/deploying/gunicorn.rst index e2b8a1c0..d9f6c069 100644 --- a/docs/deploying/gunicorn.rst +++ b/docs/deploying/gunicorn.rst @@ -74,8 +74,8 @@ errors are shown. To show access logs on stdout, use the Configuration File ------------------ -While passing arguments to Gunicorn via the command line is useful for simple -setups, production deployments usually rely on a configuration file. +While passing arguments to Gunicorn via the command line is useful for simple +setups, production deployments usually rely on a configuration file. Create a file named ``gunicorn.conf.py`` in your project directory: @@ -86,7 +86,7 @@ Create a file named ``gunicorn.conf.py`` in your project directory: workers = 4 accesslog = "-" -You can then run Gunicorn by pointing it to your configuration file using +You can then run Gunicorn by pointing it to your configuration file using the ``-c`` option: .. code-block:: text @@ -97,12 +97,12 @@ the ``-c`` option: Running in the Background ------------------------- -Running Gunicorn from the command line blocks the terminal. For production -deployments, you should use a process manager like ``systemd`` or ``supervisor`` -to run Gunicorn in the background, start it automatically on boot and restart -it if it crashes. +Running Gunicorn from the command line blocks the terminal. For production +deployments, you should use a process manager like ``systemd`` or ``supervisor`` +to run Gunicorn in the background, start it automatically on boot and restart +it if it crashes. -See the Gunicorn documentation on `Deploying Gunicorn `_ +See the Gunicorn documentation on `Deploying Gunicorn `_ for examples of systemd service files. @@ -128,10 +128,10 @@ otherwise it will be possible to bypass the proxy. IP address in your browser. .. note:: - When running Gunicorn behind a reverse proxy, the proxy will intercept the - client's IP address. To ensure your Flask application correctly reads the - forwarded headers (like ``X-Forwarded-For``), you must apply the - :class:`~werkzeug.middleware.proxy_fix.ProxyFix` middleware. See + When running Gunicorn behind a reverse proxy, the proxy will intercept the + client's IP address. To ensure your Flask application correctly reads the + forwarded headers (like ``X-Forwarded-For``), you must apply the + :class:`~werkzeug.middleware.proxy_fix.ProxyFix` middleware. See :doc:`proxy_fix` for more information. @@ -155,4 +155,4 @@ required. Starting gunicorn 20.1.0 Listening at: http://127.0.0.1:8000 (x) Using worker: gevent - Booting worker with pid: x \ No newline at end of file + Booting worker with pid: x diff --git a/docs/tutorial/database.rst b/docs/tutorial/database.rst index bbecfe7e..261a70f2 100644 --- a/docs/tutorial/database.rst +++ b/docs/tutorial/database.rst @@ -208,10 +208,10 @@ previous page. .. warning:: - The ``init-db`` command will run the ``schema.sql`` file, which starts by - dropping the existing ``user`` and ``post`` tables. **Running this command - will permanently delete any existing data in your database.** Only run it - when you are setting up the project for the first time or if you intentionally + The ``init-db`` command will run the ``schema.sql`` file, which starts by + dropping the existing ``user`` and ``post`` tables. **Running this command + will permanently delete any existing data in your database.** Only run it + when you are setting up the project for the first time or if you intentionally want to start over with an empty database. Run the ``init-db`` command: @@ -224,4 +224,4 @@ Run the ``init-db`` command: There will now be a ``flaskr.sqlite`` file in the ``instance`` folder in your project. -Continue to :doc:`views`. \ No newline at end of file +Continue to :doc:`views`. diff --git a/docs/tutorial/deploy.rst b/docs/tutorial/deploy.rst index bdfcc0b4..cda1bd26 100644 --- a/docs/tutorial/deploy.rst +++ b/docs/tutorial/deploy.rst @@ -73,9 +73,9 @@ will read from if it exists. Copy the generated value into it. SECRET_KEY = '192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf' .. warning:: - Never commit the file containing your production ``SECRET_KEY`` to version - control. Ensure that your ``.gitignore`` file excludes the ``instance/`` - folder and the specific ``config.py`` file to prevent leaking your secret + Never commit the file containing your production ``SECRET_KEY`` to version + control. Ensure that your ``.gitignore`` file excludes the ``instance/`` + folder and the specific ``config.py`` file to prevent leaking your secret key to a public repository. You can also set any other necessary configuration here, although @@ -114,4 +114,4 @@ servers and deployment options that you may choose for your project. .. _Waitress: https://docs.pylonsproject.org/projects/waitress/en/stable/ -Continue to :doc:`next`. \ No newline at end of file +Continue to :doc:`next`.