We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improve documentation for configuration options
Currently, our config options are documented only in a collapsed-by-default text block in https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#command-line-options. This is not very discoverable and makes it hard to give more detailed documentation, such as examples.

Instead, we should have a docs page with a separate section for each option. We can start with the existing descriptions, and extend them as needed for options with more complicated behavior.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `scripts/check_version_in_basics_example.py`
Content:
```
1 """
2 Check that the rev value in the example from ``the_basics.md`` matches
3 the latest version of Black. This saves us from forgetting to update that
4 during the release process.
5 """
6 
7 import os
8 import sys
9 
10 import commonmark
11 from bs4 import BeautifulSoup
12 
13 
14 def main(changes: str, the_basics: str) -> None:
15     changes_html = commonmark.commonmark(changes)
16     changes_soup = BeautifulSoup(changes_html, "html.parser")
17     headers = changes_soup.find_all("h2")
18     tags = [header.string for header in headers if header.string != "Unreleased"]
19     latest_tag = tags[0]
20 
21     the_basics_html = commonmark.commonmark(the_basics)
22     the_basics_soup = BeautifulSoup(the_basics_html, "html.parser")
23     (version_example,) = [
24         code_block.string
25         for code_block in the_basics_soup.find_all(class_="language-console")
26         if "$ black --version" in code_block.string
27     ]
28 
29     for tag in tags:
30         if tag in version_example and tag != latest_tag:
31             print(
32                 "Please set the version in the ``black --version`` "
33                 "example from ``the_basics.md`` to be the latest one.\n"
34                 f"Expected {latest_tag}, got {tag}.\n"
35             )
36             sys.exit(1)
37 
38 
39 if __name__ == "__main__":
40     with open("CHANGES.md", encoding="utf-8") as fd:
41         changes = fd.read()
42     with open(
43         os.path.join("docs", "usage_and_configuration", "the_basics.md"),
44         encoding="utf-8",
45     ) as fd:
46         the_basics = fd.read()
47     main(changes, the_basics)
48
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/scripts/check_version_in_basics_example.py b/scripts/check_version_in_basics_example.py
--- a/scripts/check_version_in_basics_example.py
+++ b/scripts/check_version_in_basics_example.py
@@ -20,20 +20,21 @@
 
     the_basics_html = commonmark.commonmark(the_basics)
     the_basics_soup = BeautifulSoup(the_basics_html, "html.parser")
-    (version_example,) = [
+    version_examples = [
         code_block.string
         for code_block in the_basics_soup.find_all(class_="language-console")
         if "$ black --version" in code_block.string
     ]
 
     for tag in tags:
-        if tag in version_example and tag != latest_tag:
-            print(
-                "Please set the version in the ``black --version`` "
-                "example from ``the_basics.md`` to be the latest one.\n"
-                f"Expected {latest_tag}, got {tag}.\n"
-            )
-            sys.exit(1)
+        for version_example in version_examples:
+            if tag in version_example and tag != latest_tag:
+                print(
+                    "Please set the version in the ``black --version`` "
+                    "examples from ``the_basics.md`` to be the latest one.\n"
+                    f"Expected {latest_tag}, got {tag}.\n"
+                )
+                sys.exit(1)
 
 
 if __name__ == "__main__":

{"golden_diff": "diff --git a/scripts/check_version_in_basics_example.py b/scripts/check_version_in_basics_example.py\n--- a/scripts/check_version_in_basics_example.py\n+++ b/scripts/check_version_in_basics_example.py\n@@ -20,20 +20,21 @@\n \n     the_basics_html = commonmark.commonmark(the_basics)\n     the_basics_soup = BeautifulSoup(the_basics_html, \"html.parser\")\n-    (version_example,) = [\n+    version_examples = [\n         code_block.string\n         for code_block in the_basics_soup.find_all(class_=\"language-console\")\n         if \"$ black --version\" in code_block.string\n     ]\n \n     for tag in tags:\n-        if tag in version_example and tag != latest_tag:\n-            print(\n-                \"Please set the version in the ``black --version`` \"\n-                \"example from ``the_basics.md`` to be the latest one.\\n\"\n-                f\"Expected {latest_tag}, got {tag}.\\n\"\n-            )\n-            sys.exit(1)\n+        for version_example in version_examples:\n+            if tag in version_example and tag != latest_tag:\n+                print(\n+                    \"Please set the version in the ``black --version`` \"\n+                    \"examples from ``the_basics.md`` to be the latest one.\\n\"\n+                    f\"Expected {latest_tag}, got {tag}.\\n\"\n+                )\n+                sys.exit(1)\n \n \n if __name__ == \"__main__\":\n", "issue": "Improve documentation for configuration options\nCurrently, our config options are documented only in a collapsed-by-default text block in https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#command-line-options. This is not very discoverable and makes it hard to give more detailed documentation, such as examples.\r\n\r\nInstead, we should have a docs page with a separate section for each option. We can start with the existing descriptions, and extend them as needed for options with more complicated behavior.\n", "before_files": [{"content": "\"\"\"\nCheck that the rev value in the example from ``the_basics.md`` matches\nthe latest version of Black. This saves us from forgetting to update that\nduring the release process.\n\"\"\"\n\nimport os\nimport sys\n\nimport commonmark\nfrom bs4 import BeautifulSoup\n\n\ndef main(changes: str, the_basics: str) -> None:\n    changes_html = commonmark.commonmark(changes)\n    changes_soup = BeautifulSoup(changes_html, \"html.parser\")\n    headers = changes_soup.find_all(\"h2\")\n    tags = [header.string for header in headers if header.string != \"Unreleased\"]\n    latest_tag = tags[0]\n\n    the_basics_html = commonmark.commonmark(the_basics)\n    the_basics_soup = BeautifulSoup(the_basics_html, \"html.parser\")\n    (version_example,) = [\n        code_block.string\n        for code_block in the_basics_soup.find_all(class_=\"language-console\")\n        if \"$ black --version\" in code_block.string\n    ]\n\n    for tag in tags:\n        if tag in version_example and tag != latest_tag:\n            print(\n                \"Please set the version in the ``black --version`` \"\n                \"example from ``the_basics.md`` to be the latest one.\\n\"\n                f\"Expected {latest_tag}, got {tag}.\\n\"\n            )\n            sys.exit(1)\n\n\nif __name__ == \"__main__\":\n    with open(\"CHANGES.md\", encoding=\"utf-8\") as fd:\n        changes = fd.read()\n    with open(\n        os.path.join(\"docs\", \"usage_and_configuration\", \"the_basics.md\"),\n        encoding=\"utf-8\",\n    ) as fd:\n        the_basics = fd.read()\n    main(changes, the_basics)\n", "path": "scripts/check_version_in_basics_example.py"}], "after_files": [{"content": "\"\"\"\nCheck that the rev value in the example from ``the_basics.md`` matches\nthe latest version of Black. This saves us from forgetting to update that\nduring the release process.\n\"\"\"\n\nimport os\nimport sys\n\nimport commonmark\nfrom bs4 import BeautifulSoup\n\n\ndef main(changes: str, the_basics: str) -> None:\n    changes_html = commonmark.commonmark(changes)\n    changes_soup = BeautifulSoup(changes_html, \"html.parser\")\n    headers = changes_soup.find_all(\"h2\")\n    tags = [header.string for header in headers if header.string != \"Unreleased\"]\n    latest_tag = tags[0]\n\n    the_basics_html = commonmark.commonmark(the_basics)\n    the_basics_soup = BeautifulSoup(the_basics_html, \"html.parser\")\n    version_examples = [\n        code_block.string\n        for code_block in the_basics_soup.find_all(class_=\"language-console\")\n        if \"$ black --version\" in code_block.string\n    ]\n\n    for tag in tags:\n        for version_example in version_examples:\n            if tag in version_example and tag != latest_tag:\n                print(\n                    \"Please set the version in the ``black --version`` \"\n                    \"examples from ``the_basics.md`` to be the latest one.\\n\"\n                    f\"Expected {latest_tag}, got {tag}.\\n\"\n                )\n                sys.exit(1)\n\n\nif __name__ == \"__main__\":\n    with open(\"CHANGES.md\", encoding=\"utf-8\") as fd:\n        changes = fd.read()\n    with open(\n        os.path.join(\"docs\", \"usage_and_configuration\", \"the_basics.md\"),\n        encoding=\"utf-8\",\n    ) as fd:\n        the_basics = fd.read()\n    main(changes, the_basics)\n", "path": "scripts/check_version_in_basics_example.py"}]}