From 4c257e354988dd316a98b4fb5cc6ae656eb8bbcd Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Sat, 28 Dec 2024 08:29:33 +0100 Subject: [PATCH] docs: add `black` to allow docs formatting (#2818) * docs: add `black` to allow docs formatting * Only install black on Python >= 3.9 --- docs/applications.md | 18 +++++++++--------- requirements.txt | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/applications.md b/docs/applications.md index 695f3801..690192ef 100644 --- a/docs/applications.md +++ b/docs/applications.md @@ -1,4 +1,13 @@ +??? abstract "API Reference" + ::: starlette.applications.Starlette + options: + parameter_headings: false + show_root_heading: true + heading_level: 3 + filters: + - "__init__" + Starlette includes an application class `Starlette` that nicely ties together all of its other functionality. @@ -45,15 +54,6 @@ routes = [ app = Starlette(debug=True, routes=routes, lifespan=lifespan) ``` -??? abstract "API Reference" - ::: starlette.applications.Starlette - options: - parameter_headings: false - show_root_heading: true - heading_level: 3 - filters: - - "__init__" - ### Storing state on the app instance You can store arbitrary extra state on the application instance, using the diff --git a/requirements.txt b/requirements.txt index 0d3e004f..fc147263 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,6 +14,7 @@ pytest==8.3.4 trio==0.27.0 # Documentation +black==24.10.0; python_version >= "3.9" mkdocs==1.6.1 mkdocs-material==9.5.47 mkdocstrings-python<1.12.0; python_version < "3.9" -- 2.47.3