|
33 | 33 | import shutil |
34 | 34 | import warnings |
35 | 35 | from contextlib import suppress |
36 | | -from typing import Dict, List, Mapping, MutableMapping |
| 36 | +from typing import Dict, List, Mapping, MutableMapping, Tuple, Union |
37 | 37 |
|
38 | 38 | # 3rd party |
39 | 39 | import dict2css |
@@ -202,8 +202,10 @@ def make_rtfd(repo_path: pathlib.Path, templates: jinja2.Environment) -> List[st |
202 | 202 | *templates.globals["additional_requirements_files"], |
203 | 203 | ] |
204 | 204 |
|
205 | | - python_config = {"version": 3.8, "install": [{"requirements": r} for r in install_requirements]} |
206 | | - python_config["install"].append({"method": "pip", "path": "."}) |
| 205 | + install_config: List[Dict] = [{"requirements": r} for r in install_requirements] |
| 206 | + install_config.append({"method": "pip", "path": '.'}) |
| 207 | + |
| 208 | + python_config = {"version": 3.8, "install": install_config} |
207 | 209 |
|
208 | 210 | # Formats: Optionally build your docs in additional formats such as PDF and ePub |
209 | 211 | config = {"version": 2, "sphinx": sphinx_config, "formats": "all", "python": python_config} |
@@ -387,22 +389,28 @@ def make_alabaster_theming() -> str: |
387 | 389 | solid_border = {"border-style": "solid"} |
388 | 390 | docs_bottom_margin = {"margin-bottom": (dict2css.px(17), dict2css.IMPORTANT)} |
389 | 391 |
|
390 | | - object_border = {"padding": "3px 3px 3px 5px", **docs_bottom_margin, **solid_border} |
| 392 | + BorderMappingType = MutableMapping[str, Union[str, Tuple[str, str]]] |
| 393 | + |
| 394 | + object_border: BorderMappingType = { |
| 395 | + "padding": "3px 3px 3px 5px", |
| 396 | + **docs_bottom_margin, |
| 397 | + **solid_border, |
| 398 | + } |
391 | 399 |
|
392 | | - class_border = { |
| 400 | + class_border: BorderMappingType = { |
393 | 401 | **object_border, |
394 | 402 | "margin-top": ("7px", dict2css.IMPORTANT), |
395 | 403 | "border-color": "rgba(240, 128, 128, 0.5)", |
396 | 404 | } |
397 | 405 |
|
398 | | - function_border = { |
| 406 | + function_border: BorderMappingType = { |
399 | 407 | **object_border, |
400 | 408 | "margin-top": ("7px", dict2css.IMPORTANT), |
401 | 409 | "border-color": "lightskyblue", |
402 | 410 | } |
403 | 411 |
|
404 | | - attribute_border = {**object_border, "border-color": "rgba(119, 136, 153, 0.5)"} |
405 | | - method_border = {**object_border, "border-color": "rgba(32, 178, 170, 0.5)"} |
| 412 | + attribute_border: BorderMappingType = {**object_border, "border-color": "rgba(119, 136, 153, 0.5)"} |
| 413 | + method_border: BorderMappingType = {**object_border, "border-color": "rgba(32, 178, 170, 0.5)"} |
406 | 414 |
|
407 | 415 | table_vertical_margins = { |
408 | 416 | "margin-bottom": (dict2css.px(20), "important"), |
|
0 commit comments