|
32 | 32 | # for rst use 'sphinx.ext.autodoc' |
33 | 33 | extensions = [ |
34 | 34 | 'sphinx.ext.napoleon', 'autodoc2', 'sphinx.ext.autosummary', |
35 | | - 'sphinx.ext.githubpages', |
36 | | - 'sphinx.ext.autosummary', 'sphinx.ext.doctest', 'sphinx.ext.todo', |
37 | | - 'sphinx.ext.linkcode', 'sphinx.ext.viewcode', 'myst_parser' |
| 35 | + 'sphinx.ext.githubpages', 'myst_parser', |
| 36 | + 'sphinx.ext.doctest', 'sphinx.ext.todo', |
| 37 | + 'sphinx.ext.linkcode', 'sphinx.ext.viewcode' |
38 | 38 | ] |
39 | 39 |
|
40 | 40 | # for md auto-docs |
|
202 | 202 | # see https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#syntax-directives |
203 | 203 |
|
204 | 204 | # be more like GFM with style |
205 | | -myst_enable_extensions = set(['tasklist', 'strikethrough', 'fieldlist']) |
| 205 | +myst_enable_extensions = ('tasklist', 'strikethrough', 'fieldlist') |
206 | 206 |
|
207 | 207 | # for GFM diagrams and interoperability with other Markdown renderers |
208 | | -myst_fence_as_directive = set(('mermaid', 'suggestion', 'note')) |
| 208 | +myst_fence_as_directive = ('mermaid', 'suggestion', 'note') |
209 | 209 |
|
210 | 210 | # Focus only on github markdown |
211 | 211 | myst_gfm_only = False |
|
313 | 313 |
|
314 | 314 | # -- Link resolver ------------------------------------------------------------- |
315 | 315 | def linkcode_resolve(domain, info): |
316 | | - if domain != 'py': |
317 | | - return None |
318 | | - if not info['module']: |
| 316 | + if domain != 'py' or not info.get('module'): |
319 | 317 | return None |
320 | 318 | filename = info['module'].replace('.', '/') |
321 | 319 | return "https://github.com/reactive-firewall/python-repo/blob/stable/%s.py" % filename |
0 commit comments