@@ -29,18 +29,35 @@ extensions = [
29
29
30
30
autodoc_preserve_defaults = True
31
31
32
+ {% if cookiecutter.requires_bus_device in ["y", "yes"] and cookiecutter.requires_register in ["y", "yes"] -%}
33
+ intersphinx_mapping = {
34
+ "python": ("https://docs.python.org/3", None),
35
+ "BusDevice": ("https://docs.circuitpython.org/projects/busdevice/en/latest/", None),
36
+ "Register": ("https://docs.circuitpython.org/projects/register/en/latest/", None),
37
+ "CircuitPython": ("https://docs.circuitpython.org/en/latest/", None),
38
+ }
32
39
40
+ {% elif cookiecutter.requires_bus_device in ["y", "yes"] -%}
33
41
intersphinx_mapping = {
34
42
"python": ("https://docs.python.org/3", None),
35
- {% if cookiecutter.requires_bus_device in ["y", "yes"] -%}
36
43
"BusDevice": ("https://docs.circuitpython.org/projects/busdevice/en/latest/", None),
37
- {%- endif %}
38
- {% if cookiecutter.requires_register in ["y", "yes"] -%}
44
+ "CircuitPython": ("https://docs.circuitpython.org/en/latest/", None),
45
+ }
46
+
47
+ {% elif cookiecutter.requires_register in ["y", "yes"] -%}
48
+ intersphinx_mapping = {
49
+ "python": ("https://docs.python.org/3", None),
39
50
"Register": ("https://docs.circuitpython.org/projects/register/en/latest/", None),
40
- {%- endif %}
41
51
"CircuitPython": ("https://docs.circuitpython.org/en/latest/", None),
42
52
}
43
53
54
+ {% else -%}
55
+ intersphinx_mapping = {
56
+ "python": ("https://docs.python.org/3", None),
57
+ "CircuitPython": ("https://docs.circuitpython.org/en/latest/", None),
58
+ }
59
+
60
+ {% endif -%}
44
61
# Show the docstring from both the class and its __init__() method.
45
62
autoclass_content = "both"
46
63
0 commit comments