|
15 | 15 |
|
16 | 16 | import pytorch_sphinx_theme |
17 | 17 |
|
18 | | -sys.path.insert(0, os.path.abspath('../..')) |
| 18 | + |
| 19 | +sys.path.insert(0, os.path.abspath("../..")) |
19 | 20 |
|
20 | 21 | # -- Project information ----------------------------------------------------- |
21 | 22 |
|
22 | | -project = 'mmengine' |
23 | | -copyright = '2022, mmengine contributors' |
24 | | -author = 'mmengine contributors' |
| 23 | +project = "mmengine" |
| 24 | +copyright = "2022, mmengine contributors" |
| 25 | +author = "mmengine contributors" |
25 | 26 |
|
26 | | -version_file = '../../mmengine/version.py' |
| 27 | +version_file = "../../mmengine/version.py" |
27 | 28 | with open(version_file) as f: |
28 | | - exec(compile(f.read(), version_file, 'exec')) |
29 | | -__version__ = locals()['__version__'] |
| 29 | + exec(compile(f.read(), version_file, "exec")) |
| 30 | +__version__ = locals()["__version__"] |
30 | 31 | # The short X.Y version |
31 | 32 | version = __version__ |
32 | 33 | # The full version, including alpha/beta/rc tags |
|
49 | 50 | 'sphinx.ext.autodoc.typehints', |
50 | 51 | 'sphinx_tabs.tabs', |
51 | 52 | ] # yapf: disable |
52 | | -autodoc_typehints = 'description' |
| 53 | +autodoc_typehints = "description" |
53 | 54 | myst_heading_anchors = 4 |
54 | | -myst_enable_extensions = ['colon_fence'] |
| 55 | +myst_enable_extensions = ["colon_fence"] |
55 | 56 |
|
56 | 57 | # Configuration for intersphinx |
57 | 58 | intersphinx_mapping = { |
58 | | - 'python': ('https://docs.python.org/3', None), |
59 | | - 'numpy': ('https://numpy.org/doc/stable', None), |
60 | | - 'torch': ('https://pytorch.org/docs/stable/', None), |
61 | | - 'mmcv': ('https://mmcv.readthedocs.io/en/2.x/', None), |
| 59 | + "python": ("https://docs.python.org/3", None), |
| 60 | + "numpy": ("https://numpy.org/doc/stable", None), |
| 61 | + "torch": ("https://pytorch.org/docs/stable/", None), |
| 62 | + "mmcv": ("https://mmcv.readthedocs.io/en/2.x/", None), |
62 | 63 | } |
63 | 64 |
|
64 | 65 | # Add any paths that contain templates here, relative to this directory. |
65 | | -templates_path = ['_templates'] |
| 66 | +templates_path = ["_templates"] |
66 | 67 |
|
67 | 68 | # List of patterns, relative to source directory, that match files and |
68 | 69 | # directories to ignore when looking for source files. |
69 | 70 | # This pattern also affects html_static_path and html_extra_path. |
70 | | -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
| 71 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
71 | 72 |
|
72 | 73 | # -- Options for HTML output ------------------------------------------------- |
73 | 74 |
|
74 | 75 | # The theme to use for HTML and HTML Help pages. See the documentation for |
75 | 76 | # a list of builtin themes. |
76 | 77 | # |
77 | | -html_theme = 'pytorch_sphinx_theme' |
| 78 | +html_theme = "pytorch_sphinx_theme" |
78 | 79 | html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()] |
79 | 80 |
|
80 | 81 | html_theme_options = { |
81 | | - 'menu': [ |
82 | | - { |
83 | | - 'name': 'GitHub', |
84 | | - 'url': 'https://github.com/open-mmlab/mmengine' |
85 | | - }, |
| 82 | + "menu": [ |
| 83 | + {"name": "GitHub", "url": "https://github.com/open-mmlab/mmengine"}, |
86 | 84 | ], |
87 | 85 | # Specify the language of shared menu |
88 | | - 'menu_lang': 'en', |
| 86 | + "menu_lang": "en", |
89 | 87 | } |
90 | 88 |
|
91 | 89 | # Add any paths that contain custom static files (such as style sheets) here, |
92 | 90 | # relative to this directory. They are copied after the builtin static files, |
93 | 91 | # so a file named "default.css" will overwrite the builtin "default.css". |
94 | | -html_static_path = ['_static'] |
95 | | -html_css_files = ['css/readthedocs.css'] |
| 92 | +html_static_path = ["_static"] |
| 93 | +html_css_files = ["css/readthedocs.css"] |
96 | 94 |
|
97 | 95 | # -- Extension configuration ------------------------------------------------- |
98 | 96 | # Ignore >>> when copying code |
99 | | -copybutton_prompt_text = r'>>> |\.\.\. ' |
| 97 | +copybutton_prompt_text = r">>> |\.\.\. " |
100 | 98 | copybutton_prompt_is_regexp = True |
0 commit comments