|
1 | | -import os, sys |
| 1 | +import os |
| 2 | +import sys |
| 3 | + |
2 | 4 | sys.path.insert(0, os.path.abspath(".")) |
3 | 5 |
|
4 | 6 | import time |
5 | 7 | from importlib.metadata import version as package_version |
6 | 8 |
|
7 | | - |
8 | 9 | project = "Amaranth language & toolchain" |
9 | | -version = package_version('amaranth').replace(".editable", "") |
| 10 | +version = package_version("amaranth").replace(".editable", "") |
10 | 11 | release = version.split("+")[0] |
11 | 12 | copyright = time.strftime("2020—%Y, Amaranth project contributors") |
12 | 13 |
|
13 | 14 | extensions = [ |
14 | | - "sphinx.ext.intersphinx", |
15 | | - "sphinx.ext.doctest", |
| 15 | + "sphinx.ext.intersphinx", |
| 16 | + "sphinx.ext.doctest", |
16 | 17 | "sphinx.ext.todo", |
17 | 18 | "sphinx.ext.autodoc", |
18 | 19 | "sphinx.ext.napoleon", |
|
33 | 34 | todo_include_todos = True |
34 | 35 |
|
35 | 36 | autodoc_member_order = "bysource" |
36 | | -autodoc_default_options = { |
37 | | - "members": True |
38 | | -} |
| 37 | +autodoc_default_options = {"members": True} |
39 | 38 | autodoc_preserve_defaults = True |
40 | 39 | autodoc_inherit_docstrings = False |
41 | 40 |
|
|
49 | 48 | napoleon_include_init_with_doc = True |
50 | 49 | napoleon_include_special_with_doc = True |
51 | 50 | napoleon_custom_sections = [ |
52 | | - ("Attributes", "params_style"), # by default displays as "Variables", which is confusing |
53 | | - ("Members", "params_style"), # `lib.wiring` signature members |
54 | | - "Platform overrides" |
| 51 | + ( |
| 52 | + "Attributes", |
| 53 | + "params_style", |
| 54 | + ), # by default displays as "Variables", which is confusing |
| 55 | + ("Members", "params_style"), # `lib.wiring` signature members |
| 56 | + "Platform overrides", |
55 | 57 | ] |
56 | 58 |
|
57 | 59 | html_theme = "sphinx_rtd_theme" |
58 | 60 | html_static_path = ["_static"] |
59 | 61 | html_css_files = ["custom.css"] |
60 | 62 | html_js_files = ["version-switch.js"] |
61 | 63 | html_logo = "_static/logo.png" |
| 64 | +html_favicon = "_static/favicon.ico" |
62 | 65 |
|
63 | 66 | rst_prolog = """ |
64 | 67 | .. role:: py(code) |
|
70 | 73 | # Picked up automatically by ReST and doesn't have an index. |
71 | 74 | r"^https://amaranth-lang\.org/schema/$", |
72 | 75 | # Rejects requests from GHA infra. |
73 | | - r"^https://.+\.sourceforge\.net/" |
| 76 | + r"^https://.+\.sourceforge\.net/", |
74 | 77 | ] |
75 | 78 |
|
76 | 79 | linkcheck_anchors_ignore_for_url = [ |
|
84 | 87 | # Silence the warnings globally; otherwise they may fire on object destruction and crash completely |
85 | 88 | # unrelated tests. |
86 | 89 | import amaranth._unused |
| 90 | + |
87 | 91 | amaranth._unused.MustUse._MustUse__silence = True |
0 commit comments