]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
docs: add `black` to allow docs formatting (#2818)
authorMarcelo Trylesinski <marcelotryle@gmail.com>
Sat, 28 Dec 2024 07:29:33 +0000 (08:29 +0100)
committerGitHub <noreply@github.com>
Sat, 28 Dec 2024 07:29:33 +0000 (08:29 +0100)
* docs: add `black` to allow docs formatting

* Only install black on Python >= 3.9

docs/applications.md
requirements.txt

index 695f3801198ae49b414c8585e5ae5b6603c63fdf..690192eff1f348d70b5812ff291f4aecafba6e8d 100644 (file)
@@ -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
index 0d3e004ff6953d77e70af5b0b4a7ee704c01c626..fc147263dead3001be5f6d80902c9d21c130ac1a 100644 (file)
@@ -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"