12
12
exec (fp .read (), about )
13
13
14
14
extensions = [
15
- ' sphinx.ext.autodoc' ,
16
- ' sphinx.ext.intersphinx' ,
17
- ' sphinx_autodoc_typehints' ,
18
- ' sphinx.ext.todo' ,
19
- ' sphinx.ext.napoleon' ,
20
- ' sphinx.ext.linkcode' ,
21
- ' alagitpull' ,
22
- ' sphinx_issues' ,
23
- ' sphinx_click.ext' , # sphinx-click
24
- ' myst_parser' ,
15
+ " sphinx.ext.autodoc" ,
16
+ " sphinx.ext.intersphinx" ,
17
+ " sphinx_autodoc_typehints" ,
18
+ " sphinx.ext.todo" ,
19
+ " sphinx.ext.napoleon" ,
20
+ " sphinx.ext.linkcode" ,
21
+ " alagitpull" ,
22
+ " sphinx_issues" ,
23
+ " sphinx_click.ext" , # sphinx-click
24
+ " myst_parser" ,
25
25
]
26
26
27
27
# app setup hook
28
28
def setup (app ):
29
29
pass
30
30
31
31
32
- myst_enable_extensions = [' substitution' , ' replacements' ]
32
+ myst_enable_extensions = [" substitution" , " replacements" ]
33
33
34
34
35
- issues_github_path = about [' __github__' ].replace (' https://github.com/' , '' )
35
+ issues_github_path = about [" __github__" ].replace (" https://github.com/" , "" )
36
36
37
- templates_path = [' _templates' ]
37
+ templates_path = [" _templates" ]
38
38
39
- source_suffix = {' .rst' : ' restructuredtext' , ' .md' : ' markdown' }
39
+ source_suffix = {" .rst" : " restructuredtext" , " .md" : " markdown" }
40
40
41
- master_doc = ' index'
41
+ master_doc = " index"
42
42
43
- project = about [' __title__' ]
44
- copyright = about [' __copyright__' ]
43
+ project = about [" __title__" ]
44
+ copyright = about [" __copyright__" ]
45
45
46
- version = '%s' % ('.' .join (about [' __version__' ].split ('.' ))[:2 ])
47
- release = '%s' % (about [' __version__' ])
46
+ version = "%s" % ("." .join (about [" __version__" ].split ("." ))[:2 ])
47
+ release = "%s" % (about [" __version__" ])
48
48
49
- exclude_patterns = [' _build' ]
49
+ exclude_patterns = [" _build" ]
50
50
51
- pygments_style = ' sphinx'
51
+ pygments_style = " sphinx"
52
52
53
53
html_theme_path = [alagitpull .get_path ()]
54
- html_theme = ' alagitpull'
54
+ html_theme = " alagitpull"
55
55
html_theme_options = {
56
- ' logo' : ' img/vcspull.svg' ,
57
- ' github_user' : ' vcs-python' ,
58
- ' github_repo' : ' vcspull' ,
59
- ' github_type' : ' star' ,
60
- ' github_banner' : True ,
61
- ' projects' : alagitpull .projects ,
62
- ' project_name' : about [' __title__' ],
63
- ' project_title' : about [' __title__' ],
64
- ' project_description' : about [' __description__' ],
65
- ' project_url' : about [' __docs__' ],
66
- ' show_meta_manifest_tag' : True ,
67
- ' show_meta_og_tags' : True ,
68
- ' show_meta_app_icon_tags' : True ,
56
+ " logo" : " img/vcspull.svg" ,
57
+ " github_user" : " vcs-python" ,
58
+ " github_repo" : " vcspull" ,
59
+ " github_type" : " star" ,
60
+ " github_banner" : True ,
61
+ " projects" : alagitpull .projects ,
62
+ " project_name" : about [" __title__" ],
63
+ " project_title" : about [" __title__" ],
64
+ " project_description" : about [" __description__" ],
65
+ " project_url" : about [" __docs__" ],
66
+ " show_meta_manifest_tag" : True ,
67
+ " show_meta_og_tags" : True ,
68
+ " show_meta_app_icon_tags" : True ,
69
69
}
70
70
html_sidebars = {
71
- '**' : [
72
- ' about.html' ,
73
- ' navigation.html' ,
74
- ' relations.html' ,
75
- ' more.html' ,
76
- ' searchbox.html' ,
71
+ "**" : [
72
+ " about.html" ,
73
+ " navigation.html" ,
74
+ " relations.html" ,
75
+ " more.html" ,
76
+ " searchbox.html" ,
77
77
]
78
78
}
79
79
80
- html_static_path = [' _static' ]
81
- html_extra_path = [' manifest.json' ]
80
+ html_static_path = [" _static" ]
81
+ html_extra_path = [" manifest.json" ]
82
82
83
- alagitpull_internal_hosts = [' vcspull.git-pull.com' , ' 0.0.0.0' ]
83
+ alagitpull_internal_hosts = [" vcspull.git-pull.com" , " 0.0.0.0" ]
84
84
alagitpull_external_hosts_new_window = True
85
85
86
86
87
- htmlhelp_basename = ' %sdoc' % about [' __title__' ]
87
+ htmlhelp_basename = " %sdoc" % about [" __title__" ]
88
88
89
89
latex_documents = [
90
90
(
91
- ' index' ,
92
- ' {0}.tex' .format (about [' __package_name__' ]),
93
- ' {0} Documentation' .format (about [' __title__' ]),
94
- about [' __author__' ],
95
- ' manual' ,
91
+ " index" ,
92
+ " {0}.tex" .format (about [" __package_name__" ]),
93
+ " {0} Documentation" .format (about [" __title__" ]),
94
+ about [" __author__" ],
95
+ " manual" ,
96
96
)
97
97
]
98
98
99
99
man_pages = [
100
100
(
101
- ' index' ,
102
- about [' __package_name__' ],
103
- ' {0} Documentation' .format (about [' __title__' ]),
104
- about [' __author__' ],
101
+ " index" ,
102
+ about [" __package_name__" ],
103
+ " {0} Documentation" .format (about [" __title__" ]),
104
+ about [" __author__" ],
105
105
1 ,
106
106
)
107
107
]
108
108
109
109
texinfo_documents = [
110
110
(
111
- ' index' ,
112
- ' {0}' .format (about [' __package_name__' ]),
113
- ' {0} Documentation' .format (about [' __title__' ]),
114
- about [' __author__' ],
115
- about [' __package_name__' ],
116
- about [' __description__' ],
117
- ' Miscellaneous' ,
111
+ " index" ,
112
+ " {0}" .format (about [" __package_name__" ]),
113
+ " {0} Documentation" .format (about [" __title__" ]),
114
+ about [" __author__" ],
115
+ about [" __package_name__" ],
116
+ about [" __description__" ],
117
+ " Miscellaneous" ,
118
118
)
119
119
]
120
120
121
121
intersphinx_mapping = {
122
- 'py' : (' https://docs.python.org/' , None ),
123
- ' libvcs' : (' http://libvcs.git-pull.com/' , None ),
122
+ "py" : (" https://docs.python.org/" , None ),
123
+ " libvcs" : (" http://libvcs.git-pull.com/" , None ),
124
124
}
125
125
126
126
@@ -139,18 +139,18 @@ def linkcode_resolve(domain, info): # NOQA: C901
139
139
From https://github.com/numpy/numpy/blob/v1.15.1/doc/source/conf.py, 7c49cfa
140
140
on Jul 31. License BSD-3. https://github.com/numpy/numpy/blob/v1.15.1/LICENSE.txt
141
141
"""
142
- if domain != 'py' :
142
+ if domain != "py" :
143
143
return None
144
144
145
- modname = info [' module' ]
146
- fullname = info [' fullname' ]
145
+ modname = info [" module" ]
146
+ fullname = info [" fullname" ]
147
147
148
148
submod = sys .modules .get (modname )
149
149
if submod is None :
150
150
return None
151
151
152
152
obj = submod
153
- for part in fullname .split ('.' ):
153
+ for part in fullname .split ("." ):
154
154
try :
155
155
obj = getattr (obj , part )
156
156
except Exception :
@@ -184,18 +184,18 @@ def linkcode_resolve(domain, info): # NOQA: C901
184
184
185
185
fn = relpath (fn , start = dirname (vcspull .__file__ ))
186
186
187
- if ' dev' in about [' __version__' ]:
187
+ if " dev" in about [" __version__" ]:
188
188
return "%s/blob/master/%s/%s%s" % (
189
- about [' __github__' ],
190
- about [' __package_name__' ],
189
+ about [" __github__" ],
190
+ about [" __package_name__" ],
191
191
fn ,
192
192
linespec ,
193
193
)
194
194
else :
195
195
return "%s/blob/v%s/%s/%s%s" % (
196
- about [' __github__' ],
197
- about [' __version__' ],
198
- about [' __package_name__' ],
196
+ about [" __github__" ],
197
+ about [" __version__" ],
198
+ about [" __package_name__" ],
199
199
fn ,
200
200
linespec ,
201
201
)
0 commit comments