1414import sphinx_compas_theme
1515from sphinx .ext .napoleon .docstring import NumpyDocstring
1616
17- sys .path .append (os .path .join (os .path .dirname (__file__ ), ' _ext' ))
17+ sys .path .append (os .path .join (os .path .dirname (__file__ ), " _ext" ))
1818
1919# patches
2020
@@ -28,7 +28,9 @@ def patched_m2r2_setup(app):
2828 app .add_source_suffix (".md" , "markdown" )
2929 app .add_source_parser (m2r2 .M2RParser )
3030 return dict (
31- version = m2r2 .__version__ , parallel_read_safe = True , parallel_write_safe = True ,
31+ version = m2r2 .__version__ ,
32+ parallel_read_safe = True ,
33+ parallel_write_safe = True ,
3234 )
3335
3436
@@ -76,7 +78,7 @@ def patched_m2r2_setup(app):
7678 "m2r2" ,
7779 # "nbsphinx",
7880 "sphinx.ext.autodoc.typehints" ,
79- "tabs"
81+ "tabs" ,
8082]
8183
8284# autodoc options
@@ -98,7 +100,7 @@ def patched_m2r2_setup(app):
98100 "rhinoscriptsyntax" ,
99101 "bpy" ,
100102 "bmesh" ,
101- "mathutils"
103+ "mathutils" ,
102104]
103105
104106autodoc_default_options = {
@@ -112,7 +114,7 @@ def patched_m2r2_setup(app):
112114
113115
114116def skip (app , what , name , obj , would_skip , options ):
115- if name .startswith ('_' ):
117+ if name .startswith ("_" ):
116118 return True
117119 return would_skip
118120
@@ -134,7 +136,7 @@ def setup(app):
134136 "rhinoscriptsyntax" ,
135137 "bpy" ,
136138 "bmesh" ,
137- "mathutils"
139+ "mathutils" ,
138140]
139141
140142# graph options
@@ -205,7 +207,7 @@ def patched_parse(self):
205207plot_include_source = False
206208plot_html_show_source_link = False
207209plot_html_show_formats = False
208- plot_formats = [' png' ]
210+ plot_formats = [" png" ]
209211# plot_pre_code
210212# plot_basedir
211213# plot_rcparams
@@ -237,26 +239,26 @@ def patched_parse(self):
237239
238240
239241def linkcode_resolve (domain , info ):
240- if domain != 'py' :
242+ if domain != "py" :
241243 return None
242- if not info [' module' ]:
244+ if not info [" module" ]:
243245 return None
244- if not info [' fullname' ]:
246+ if not info [" fullname" ]:
245247 return None
246248
247- package = info [' module' ].split ('.' )[0 ]
248- if not package .startswith (' compas' ):
249+ package = info [" module" ].split ("." )[0 ]
250+ if not package .startswith (" compas" ):
249251 return None
250252
251- module = importlib .import_module (info [' module' ])
252- parts = info [' fullname' ].split ('.' )
253+ module = importlib .import_module (info [" module" ])
254+ parts = info [" fullname" ].split ("." )
253255
254256 if len (parts ) == 1 :
255- obj = getattr (module , info [' fullname' ])
257+ obj = getattr (module , info [" fullname" ])
256258 mod = inspect .getmodule (obj )
257259 if not mod :
258260 return None
259- filename = mod .__name__ .replace ('.' , '/' )
261+ filename = mod .__name__ .replace ("." , "/" )
260262 lineno = inspect .getsourcelines (obj )[1 ]
261263 elif len (parts ) == 2 :
262264 obj_name , attr_name = parts
@@ -266,7 +268,7 @@ def linkcode_resolve(domain, info):
266268 mod = inspect .getmodule (attr )
267269 if not mod :
268270 return None
269- filename = mod .__name__ .replace ('.' , '/' )
271+ filename = mod .__name__ .replace ("." , "/" )
270272 lineno = inspect .getsourcelines (attr )[1 ]
271273 else :
272274 return None
@@ -281,7 +283,7 @@ def linkcode_resolve(domain, info):
281283
282284extlinks = {
283285 "rhino" : ("https://developer.rhino3d.com/api/RhinoCommon/html/T_%s.htm" , "%s" ),
284- "blender" : ("https://docs.blender.org/api/2.93/%s.html" , "%s" )
286+ "blender" : ("https://docs.blender.org/api/2.93/%s.html" , "%s" ),
285287}
286288
287289# -- Options for HTML output ----------------------------------------------
@@ -292,7 +294,7 @@ def linkcode_resolve(domain, info):
292294 "navbar_active" : "compas" ,
293295 "package_version" : release ,
294296 "package_docs" : "https://compas.dev/compas/" ,
295- "package_old_versions_txt" : "https://compas.dev/compas/doc_versions.txt"
297+ "package_old_versions_txt" : "https://compas.dev/compas/doc_versions.txt" ,
296298}
297299html_context = {}
298300html_static_path = sphinx_compas_theme .get_html_static_path ()
0 commit comments