|
19 | 19 |
|
20 | 20 |
|
21 | 21 | _docs_path = os.path.dirname(__file__) |
22 | | -_version_path = os.path.abspath(os.path.join(_docs_path, |
23 | | - '..', 'aiosignal', '__init__.py')) |
24 | | -with io.open(_version_path, 'r', encoding='latin1') as fp: |
| 22 | +_version_path = os.path.abspath( |
| 23 | + os.path.join(_docs_path, "..", "aiosignal", "__init__.py") |
| 24 | +) |
| 25 | +with io.open(_version_path, "r", encoding="latin1") as fp: |
25 | 26 | try: |
26 | | - _version_info = re.search(r"^__version__ = '" |
27 | | - r"(?P<major>\d+)" |
28 | | - r"\.(?P<minor>\d+)" |
29 | | - r"\.(?P<patch>\d+)" |
30 | | - r"(?P<tag>.*)?'$", |
31 | | - fp.read(), re.M).groupdict() |
| 27 | + _version_info = re.search( |
| 28 | + r'^__version__ = "' |
| 29 | + r"(?P<major>\d+)" |
| 30 | + r"\.(?P<minor>\d+)" |
| 31 | + r"\.(?P<patch>\d+)" |
| 32 | + r'(?P<tag>.*)?"$', |
| 33 | + fp.read(), |
| 34 | + re.M, |
| 35 | + ).groupdict() |
32 | 36 | except IndexError: |
33 | | - raise RuntimeError('Unable to determine version.') |
| 37 | + raise RuntimeError("Unable to determine version.") |
34 | 38 |
|
35 | 39 |
|
36 | 40 | # -- General configuration ------------------------------------------------ |
|
42 | 46 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
43 | 47 | # ones. |
44 | 48 | extensions = [ |
45 | | - 'sphinx.ext.viewcode', |
46 | | - 'sphinx.ext.intersphinx', |
47 | | - 'sphinxcontrib.asyncio', |
| 49 | + "sphinx.ext.viewcode", |
| 50 | + "sphinx.ext.intersphinx", |
| 51 | + "sphinxcontrib.asyncio", |
48 | 52 | ] |
49 | 53 |
|
50 | 54 |
|
51 | 55 | try: |
52 | 56 | import sphinxcontrib.spelling # noqa |
53 | | - extensions.append('sphinxcontrib.spelling') |
| 57 | + |
| 58 | + extensions.append("sphinxcontrib.spelling") |
54 | 59 | except ImportError: |
55 | 60 | pass |
56 | 61 |
|
57 | 62 |
|
58 | 63 | intersphinx_mapping = { |
59 | | - 'python': ('http://docs.python.org/3', None), |
60 | | - 'aiohttp': |
61 | | - ('https://docs.aiohttp.org/en/stable/', None), |
62 | | - 'frozenlist': |
63 | | - ('https://frozenlist.readthedocs.io/en/latest/', None), |
| 64 | + "python": ("http://docs.python.org/3", None), |
| 65 | + "aiohttp": ("https://docs.aiohttp.org/en/stable/", None), |
| 66 | + "frozenlist": ("https://frozenlist.readthedocs.io/en/latest/", None), |
64 | 67 | } |
65 | 68 |
|
66 | 69 | # Add any paths that contain templates here, relative to this directory. |
67 | | -templates_path = ['_templates'] |
| 70 | +templates_path = ["_templates"] |
68 | 71 |
|
69 | 72 | # The suffix of source filenames. |
70 | | -source_suffix = '.rst' |
| 73 | +source_suffix = ".rst" |
71 | 74 |
|
72 | 75 | # The encoding of source files. |
73 | 76 | # source_encoding = 'utf-8-sig' |
74 | 77 |
|
75 | 78 | # The master toctree document. |
76 | | -master_doc = 'index' |
| 79 | +master_doc = "index" |
77 | 80 |
|
78 | 81 | # General information about the project. |
79 | | -project = 'aiosignal' |
80 | | -copyright = '2013-2019, aiosignal contributors' |
| 82 | +project = "aiosignal" |
| 83 | +copyright = "2013-2019, aiosignal contributors" |
81 | 84 |
|
82 | 85 | # The version info for the project you're documenting, acts as replacement for |
83 | 86 | # |version| and |release|, also used in various other places throughout the |
84 | 87 | # built documents. |
85 | 88 | # |
86 | 89 | # The short X.Y version. |
87 | | -version = '{major}.{minor}'.format(**_version_info) |
| 90 | +version = "{major}.{minor}".format(**_version_info) |
88 | 91 | # The full version, including alpha/beta/rc tags. |
89 | | -release = '{major}.{minor}.{patch}{tag}'.format(**_version_info) |
| 92 | +release = "{major}.{minor}.{patch}{tag}".format(**_version_info) |
90 | 93 |
|
91 | 94 | # The language for content autogenerated by Sphinx. Refer to documentation |
92 | 95 | # for a list of supported languages. |
|
100 | 103 |
|
101 | 104 | # List of patterns, relative to source directory, that match files and |
102 | 105 | # directories to ignore when looking for source files. |
103 | | -exclude_patterns = ['_build'] |
| 106 | +exclude_patterns = ["_build"] |
104 | 107 |
|
105 | 108 | # The reST default role (used for this markup: `text`) to use for all |
106 | 109 | # documents. |
|
121 | 124 | # pygments_style = 'sphinx' |
122 | 125 |
|
123 | 126 | # The default language to highlight source code in. |
124 | | -highlight_language = 'python3' |
| 127 | +highlight_language = "python3" |
125 | 128 |
|
126 | 129 | # A list of ignored prefixes for module index sorting. |
127 | 130 | # modindex_common_prefix = [] |
|
134 | 137 |
|
135 | 138 | # The theme to use for HTML and HTML Help pages. See the documentation for |
136 | 139 | # a list of builtin themes. |
137 | | -html_theme = 'aiohttp_theme' |
| 140 | +html_theme = "aiohttp_theme" |
138 | 141 |
|
139 | 142 | # Theme options are theme-specific and customize the look and feel of a theme |
140 | 143 | # further. For a list of options available for each theme, see the |
141 | 144 | # documentation. |
142 | 145 | html_theme_options = { |
143 | | - 'logo': None, |
144 | | - 'description': 'aiosignal: a list of registered asynchronous callbacks.', |
145 | | - 'canonical_url': 'http://aiosignal.readthedocs.io/en/stable/', |
146 | | - 'github_user': 'aio-libs', |
147 | | - 'github_repo': 'aiosignal', |
148 | | - 'github_button': True, |
149 | | - 'github_type': 'star', |
150 | | - 'github_banner': True, |
151 | | - 'badges': [{'image': 'https://github.com/aio-libs/aiosignal/workflows/CI/badge.svg', |
152 | | - 'target': 'https://github.com/aio-libs/aiosignal/actions?query=workflow%3ACI', |
153 | | - 'height': '20', |
154 | | - 'alt': 'GitHub CI status for master branch'}, |
155 | | - {'image': 'https://codecov.io/github/aio-libs/aiosignal/coverage.svg?branch=master', |
156 | | - 'target': 'https://codecov.io/github/aio-libs/aiosignal', |
157 | | - 'height': '20', |
158 | | - 'alt': 'Code coverage status'}, |
159 | | - {'image': 'https://badge.fury.io/py/aiosignal.svg', |
160 | | - 'target': 'https://badge.fury.io/py/aiosignal', |
161 | | - 'height': '20', |
162 | | - 'alt': 'Latest PyPI package version'}, |
163 | | - {'image': 'https://img.shields.io/discourse/topics?server=https%3A%2F%2Faio-libs.discourse.group%2F', |
164 | | - 'target': 'https://aio-libs.discourse.group/', |
165 | | - 'height': '20', |
166 | | - 'alt': 'Discourse group for io-libs'}, |
167 | | - {'image': 'https://badges.gitter.im/Join%20Chat.svg', |
168 | | - 'target': 'https://gitter.im/aio-libs/Lobby', |
169 | | - 'height': '20', |
170 | | - 'alt': 'Chat on Gitter'}], |
| 146 | + "logo": None, |
| 147 | + "description": "aiosignal: a list of registered asynchronous callbacks.", |
| 148 | + "canonical_url": "http://aiosignal.readthedocs.io/en/stable/", |
| 149 | + "github_user": "aio-libs", |
| 150 | + "github_repo": "aiosignal", |
| 151 | + "github_button": True, |
| 152 | + "github_type": "star", |
| 153 | + "github_banner": True, |
| 154 | + "badges": [ |
| 155 | + { |
| 156 | + "image": "https://github.com/aio-libs/aiosignal/workflows/CI/badge.svg", |
| 157 | + "target": "https://github.com/aio-libs/aiosignal/actions?query=workflow%3ACI", |
| 158 | + "height": "20", |
| 159 | + "alt": "GitHub CI status for master branch", |
| 160 | + }, |
| 161 | + { |
| 162 | + "image": "https://codecov.io/github/aio-libs/aiosignal/coverage.svg?branch=master", |
| 163 | + "target": "https://codecov.io/github/aio-libs/aiosignal", |
| 164 | + "height": "20", |
| 165 | + "alt": "Code coverage status", |
| 166 | + }, |
| 167 | + { |
| 168 | + "image": "https://badge.fury.io/py/aiosignal.svg", |
| 169 | + "target": "https://badge.fury.io/py/aiosignal", |
| 170 | + "height": "20", |
| 171 | + "alt": "Latest PyPI package version", |
| 172 | + }, |
| 173 | + { |
| 174 | + "image": "https://img.shields.io/discourse/topics?server=https%3A%2F%2Faio-libs.discourse.group%2F", |
| 175 | + "target": "https://aio-libs.discourse.group/", |
| 176 | + "height": "20", |
| 177 | + "alt": "Discourse group for io-libs", |
| 178 | + }, |
| 179 | + { |
| 180 | + "image": "https://badges.gitter.im/Join%20Chat.svg", |
| 181 | + "target": "https://gitter.im/aio-libs/Lobby", |
| 182 | + "height": "20", |
| 183 | + "alt": "Chat on Gitter", |
| 184 | + }, |
| 185 | + ], |
171 | 186 | } |
172 | 187 |
|
173 | 188 | # Add any paths that contain custom themes here, relative to this directory. |
|
209 | 224 |
|
210 | 225 | # Custom sidebar templates, maps document names to template names. |
211 | 226 | html_sidebars = { |
212 | | - '**': [ |
213 | | - 'about.html', 'navigation.html', 'searchbox.html', |
| 227 | + "**": [ |
| 228 | + "about.html", |
| 229 | + "navigation.html", |
| 230 | + "searchbox.html", |
214 | 231 | ] |
215 | 232 | } |
216 | 233 |
|
|
245 | 262 | # html_file_suffix = None |
246 | 263 |
|
247 | 264 | # Output file base name for HTML help builder. |
248 | | -htmlhelp_basename = 'aiosignaldoc' |
| 265 | +htmlhelp_basename = "aiosignaldoc" |
249 | 266 |
|
250 | 267 |
|
251 | 268 | # -- Options for LaTeX output --------------------------------------------- |
252 | 269 |
|
253 | 270 | latex_elements = { |
254 | 271 | # The paper size ('letterpaper' or 'a4paper'). |
255 | 272 | # 'papersize': 'letterpaper', |
256 | | - |
257 | 273 | # The font size ('10pt', '11pt' or '12pt'). |
258 | 274 | # 'pointsize': '10pt', |
259 | | - |
260 | 275 | # Additional stuff for the LaTeX preamble. |
261 | 276 | # 'preamble': '', |
262 | 277 | } |
|
265 | 280 | # (source start file, target name, title, |
266 | 281 | # author, documentclass [howto, manual, or own class]). |
267 | 282 | latex_documents = [ |
268 | | - ('index', 'aiosignal.tex', 'aiosignal Documentation', |
269 | | - 'aiosignal contributors', 'manual'), |
| 283 | + ( |
| 284 | + "index", |
| 285 | + "aiosignal.tex", |
| 286 | + "aiosignal Documentation", |
| 287 | + "aiosignal contributors", |
| 288 | + "manual", |
| 289 | + ), |
270 | 290 | ] |
271 | 291 |
|
272 | 292 | # The name of an image file (relative to this directory) to place at the top of |
|
294 | 314 |
|
295 | 315 | # One entry per manual page. List of tuples |
296 | 316 | # (source start file, name, description, authors, manual section). |
297 | | -man_pages = [ |
298 | | - ('index', 'aiosignal', 'aiosignal Documentation', |
299 | | - ['aiosignal'], 1) |
300 | | -] |
| 317 | +man_pages = [("index", "aiosignal", "aiosignal Documentation", ["aiosignal"], 1)] |
301 | 318 |
|
302 | 319 | # If true, show URL addresses after external links. |
303 | 320 | # man_show_urls = False |
|
309 | 326 | # (source start file, target name, title, author, |
310 | 327 | # dir menu entry, description, category) |
311 | 328 | texinfo_documents = [ |
312 | | - ('index', 'aiosignal', 'aiosignal Documentation', |
313 | | - 'aiosignal contributors', 'aiosignal', 'One line description of project.', |
314 | | - 'Miscellaneous'), |
| 329 | + ( |
| 330 | + "index", |
| 331 | + "aiosignal", |
| 332 | + "aiosignal Documentation", |
| 333 | + "aiosignal contributors", |
| 334 | + "aiosignal", |
| 335 | + "One line description of project.", |
| 336 | + "Miscellaneous", |
| 337 | + ), |
315 | 338 | ] |
316 | 339 |
|
317 | 340 | # Documents to append as an appendix to all manuals. |
|
0 commit comments