1212#
1313import os
1414import sys
15+
1516# sys.path.insert(0, os.path.abspath('.'))
16- sys .path .insert (0 , os .path .join (os .path .dirname (__file__ ), '..' ))
17- on_rtd = os .environ .get ('READTHEDOCS' , None ) == 'True'
17+ sys .path .insert (0 , os .path .join (os .path .dirname (__file__ ), ".." ))
18+ on_rtd = os .environ .get ("READTHEDOCS" , None ) == "True"
19+
1820
1921# Mock out certain modules while building documentation
2022class Mock :
2123 __all__ = []
22- def __init__ (self , * args , ** kw ): pass
23- def __call__ (self , * args , ** kw ): return Mock ()
24- def __mul__ (self , other ): return Mock ()
25- def __and__ (self , other ): return Mock ()
26- def __bool__ (self ): return False
27- def __nonzero__ (self ): return False
24+
25+ def __init__ (self , * args , ** kw ):
26+ pass
27+
28+ def __call__ (self , * args , ** kw ):
29+ return Mock ()
30+
31+ def __mul__ (self , other ):
32+ return Mock ()
33+
34+ def __and__ (self , other ):
35+ return Mock ()
36+
37+ def __bool__ (self ):
38+ return False
39+
40+ def __nonzero__ (self ):
41+ return False
42+
2843 @classmethod
2944 def __getattr__ (cls , name ):
30- if name in (' __file__' , ' __path__' ):
31- return ' /dev/null'
45+ if name in (" __file__" , " __path__" ):
46+ return " /dev/null"
3247 else :
3348 return Mock ()
3449
35- sys .modules ['machine' ] = Mock ()
36- sys .modules ['micropython' ] = Mock ()
50+
51+ sys .modules ["machine" ] = Mock ()
52+ sys .modules ["micropython" ] = Mock ()
3753
3854# add the ticks_ms function to time (as it is in micropython)
3955import time
40- setattr (time , 'ticks_ms' , lambda x : None )
41- setattr (time , 'ticks_us' , lambda x : None )
56+
57+ setattr (time , "ticks_ms" , lambda x : None )
58+ setattr (time , "ticks_us" , lambda x : None )
4259
4360# -- Project information -----------------------------------------------------
4461
45- project = ' picozero'
46- copyright = ' 2025, Raspberry Pi Foundation'
47- author = ' Raspberry Pi Foundation'
62+ project = " picozero"
63+ copyright = " 2025, Raspberry Pi Foundation"
64+ author = " Raspberry Pi Foundation"
4865
4966# The full version, including alpha/beta/rc tags
50- release = '0.5.0'
67+ release = "0.6.0"
5168
5269
5370# -- General configuration ---------------------------------------------------
5471
5572# Add any Sphinx extension module names here, as strings. They can be
5673# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
5774# ones.
58- extensions = [
59- 'sphinx.ext.autodoc' ,
60- 'sphinx.ext.viewcode' ,
61- 'sphinx.ext.intersphinx'
62- ]
75+ extensions = ["sphinx.ext.autodoc" , "sphinx.ext.viewcode" , "sphinx.ext.intersphinx" ]
6376
6477# Add any paths that contain templates here, relative to this directory.
65- templates_path = [' _templates' ]
78+ templates_path = [" _templates" ]
6679
6780# List of patterns, relative to source directory, that match files and
6881# directories to ignore when looking for source files.
6982# This pattern also affects html_static_path and html_extra_path.
70- exclude_patterns = [' _build' , ' Thumbs.db' , ' .DS_Store' ]
83+ exclude_patterns = [" _build" , " Thumbs.db" , " .DS_Store" ]
7184
7285
7386# -- Options for HTML output -------------------------------------------------
@@ -79,26 +92,26 @@ def __getattr__(cls, name):
7992# a list of builtin themes.
8093#
8194if on_rtd :
82- html_theme = ' sphinx_rtd_theme'
83- #html_theme_options = {}
95+ html_theme = " sphinx_rtd_theme"
96+ # html_theme_options = {}
8497 html_sidebars = {
85- '**' : [
86- ' globaltoc.html' ,
87- ' relations.html' ,
88- ' searchbox.html' ,
98+ "**" : [
99+ " globaltoc.html" ,
100+ " relations.html" ,
101+ " searchbox.html" ,
89102 ],
90103 }
91104else :
92- html_theme = ' alabaster'
93- #html_theme_options = {}
94- #html_sidebars = {}
105+ html_theme = " alabaster"
106+ # html_theme_options = {}
107+ # html_sidebars = {}
95108
96109# Add any paths that contain custom static files (such as style sheets) here,
97110# relative to this directory. They are copied after the builtin static files,
98111# so a file named "default.css" will overwrite the builtin "default.css".
99- html_static_path = [' _static' ]
112+ html_static_path = [" _static" ]
100113
101114# -- Autodoc configuration ------------------------------------------------
102115
103- autodoc_member_order = ' groupwise'
104- autodoc_default_flags = [' members' ]
116+ autodoc_member_order = " groupwise"
117+ autodoc_default_flags = [" members" ]
0 commit comments