|
21 | 21 | from recommonmark.parser import CommonMarkParser |
22 | 22 | from recommonmark.transform import AutoStructify |
23 | 23 |
|
24 | | -sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'tests')) |
| 24 | +sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "tests")) |
25 | 25 |
|
26 | 26 | # -- Project information ----------------------------------------------------- |
27 | 27 |
|
28 | | -project = 'JSONPath2 Library' |
29 | | -copyright = '2019, David Brown' |
30 | | -author = 'David Brown' |
| 28 | +project = "JSONPath2 Library" |
| 29 | +copyright = "2019, David Brown" |
| 30 | +author = "David Brown" |
31 | 31 |
|
32 | 32 | # The short X.Y version |
33 | | -version = '' |
| 33 | +version = "" |
34 | 34 | # The full version, including alpha/beta/rc tags |
35 | | -release = '' |
| 35 | +release = "" |
36 | 36 |
|
37 | 37 |
|
38 | 38 | # -- General configuration --------------------------------------------------- |
|
45 | 45 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
46 | 46 | # ones. |
47 | 47 | extensions = [ |
48 | | - 'sphinx.ext.autodoc', |
49 | | - 'sphinx.ext.viewcode', |
50 | | - 'readthedocs_ext.readthedocs' |
| 48 | + "sphinx.ext.autodoc", |
| 49 | + "sphinx.ext.viewcode", |
| 50 | + "readthedocs_ext.readthedocs", |
51 | 51 | ] |
52 | 52 |
|
53 | 53 | # Add any paths that contain templates here, relative to this directory. |
54 | | -templates_path = ['_templates'] |
| 54 | +templates_path = ["_templates"] |
55 | 55 |
|
56 | 56 | # The suffix(es) of source filenames. |
57 | 57 | # You can specify multiple suffix as a list of string: |
58 | 58 |
|
59 | 59 | source_suffix = { |
60 | | - '.rst': 'restructuredtext', |
61 | | - '.md': 'markdown', |
| 60 | + ".rst": "restructuredtext", |
| 61 | + ".md": "markdown", |
62 | 62 | } |
63 | 63 |
|
64 | 64 | # The master toctree document. |
65 | | -master_doc = 'index' |
| 65 | +master_doc = "index" |
66 | 66 |
|
67 | 67 | # The language for content autogenerated by Sphinx. Refer to documentation |
68 | 68 | # for a list of supported languages. |
|
74 | 74 | # List of patterns, relative to source directory, that match files and |
75 | 75 | # directories to ignore when looking for source files. |
76 | 76 | # This pattern also affects html_static_path and html_extra_path. |
77 | | -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
| 77 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
78 | 78 |
|
79 | 79 | # The name of the Pygments (syntax highlighting) style to use. |
80 | | -pygments_style = 'sphinx' |
| 80 | +pygments_style = "sphinx" |
81 | 81 |
|
82 | 82 |
|
83 | 83 | # -- Options for HTML output ------------------------------------------------- |
84 | 84 |
|
85 | 85 | # The theme to use for HTML and HTML Help pages. See the documentation for |
86 | 86 | # a list of builtin themes. |
87 | 87 | # |
88 | | -html_theme = 'sphinx_rtd_theme' |
| 88 | +html_theme = "sphinx_rtd_theme" |
89 | 89 |
|
90 | 90 | # Theme options are theme-specific and customize the look and feel of a theme |
91 | 91 | # further. For a list of options available for each theme, see the |
|
96 | 96 | # Add any paths that contain custom static files (such as style sheets) here, |
97 | 97 | # relative to this directory. They are copied after the builtin static files, |
98 | 98 | # so a file named "default.css" will overwrite the builtin "default.css". |
99 | | -html_static_path = ['_static'] |
| 99 | +html_static_path = ["_static"] |
100 | 100 |
|
101 | 101 | # Custom sidebar templates, must be a dictionary that maps document names |
102 | 102 | # to template names. |
|
112 | 112 | # -- Options for HTMLHelp output --------------------------------------------- |
113 | 113 |
|
114 | 114 | # Output file base name for HTML help builder. |
115 | | -htmlhelp_basename = 'JSONPath2doc' |
| 115 | +htmlhelp_basename = "JSONPath2doc" |
116 | 116 |
|
117 | 117 |
|
118 | 118 | # -- Options for LaTeX output ------------------------------------------------ |
|
121 | 121 | # The paper size ('letterpaper' or 'a4paper'). |
122 | 122 | # |
123 | 123 | # 'papersize': 'letterpaper', |
124 | | - |
125 | 124 | # The font size ('10pt', '11pt' or '12pt'). |
126 | 125 | # |
127 | 126 | # 'pointsize': '10pt', |
128 | | - |
129 | 127 | # Additional stuff for the LaTeX preamble. |
130 | 128 | # |
131 | 129 | # 'preamble': '', |
132 | | - |
133 | 130 | # Latex figure (float) alignment |
134 | 131 | # |
135 | 132 | # 'figure_align': 'htbp', |
|
139 | 136 | # (source start file, target name, title, |
140 | 137 | # author, documentclass [howto, manual, or own class]). |
141 | 138 | latex_documents = [ |
142 | | - (master_doc, 'JSONPath2.tex', 'Python JSONPath2 Documentation', |
143 | | - 'David Brown', 'manual'), |
| 139 | + ( |
| 140 | + master_doc, |
| 141 | + "JSONPath2.tex", |
| 142 | + "Python JSONPath2 Documentation", |
| 143 | + "David Brown", |
| 144 | + "manual", |
| 145 | + ), |
144 | 146 | ] |
145 | 147 |
|
146 | 148 |
|
147 | 149 | # -- Options for manual page output ------------------------------------------ |
148 | 150 |
|
149 | 151 | # One entry per manual page. List of tuples |
150 | 152 | # (source start file, name, description, authors, manual section). |
151 | | -man_pages = [ |
152 | | - (master_doc, 'jsonpath2', 'Python JSONPath2 Documentation', |
153 | | - [author], 1) |
154 | | -] |
| 153 | +man_pages = [(master_doc, "jsonpath2", "Python JSONPath2 Documentation", [author], 1)] |
155 | 154 |
|
156 | 155 |
|
157 | 156 | # -- Options for Texinfo output ---------------------------------------------- |
|
160 | 159 | # (source start file, target name, title, author, |
161 | 160 | # dir menu entry, description, category) |
162 | 161 | texinfo_documents = [ |
163 | | - (master_doc, 'JSONPath2', 'Python JSONPath2 Documentation', |
164 | | - author, 'JSONPath2', 'Python implementation for JSONPath expressions.', |
165 | | - 'Miscellaneous'), |
| 162 | + ( |
| 163 | + master_doc, |
| 164 | + "JSONPath2", |
| 165 | + "Python JSONPath2 Documentation", |
| 166 | + author, |
| 167 | + "JSONPath2", |
| 168 | + "Python implementation for JSONPath expressions.", |
| 169 | + "Miscellaneous", |
| 170 | + ), |
166 | 171 | ] |
167 | 172 |
|
168 | 173 |
|
|
181 | 186 | # epub_uid = '' |
182 | 187 |
|
183 | 188 | # A list of files that should not be packed into the epub file. |
184 | | -epub_exclude_files = ['search.html'] |
| 189 | +epub_exclude_files = ["search.html"] |
185 | 190 |
|
186 | 191 |
|
187 | 192 | # -- Extension configuration ------------------------------------------------- |
188 | 193 | autodoc_default_options = { |
189 | | - 'member-order': 'bysource', |
190 | | - 'special-members': '__init__', |
191 | | - 'undoc-members': None, |
192 | | - 'exclude-members': '__weakref__' |
| 194 | + "member-order": "bysource", |
| 195 | + "special-members": "__init__", |
| 196 | + "undoc-members": None, |
| 197 | + "exclude-members": "__weakref__", |
193 | 198 | } |
194 | 199 |
|
195 | 200 | # app setup hook |
196 | 201 |
|
197 | 202 |
|
198 | 203 | def setup(app): |
199 | 204 | """Setup the hooks for recommonmark.""" |
200 | | - app.add_config_value('recommonmark_config', { |
201 | | - # 'url_resolver': lambda url: github_doc_root + url, |
202 | | - 'auto_toc_tree_section': 'Contents', |
203 | | - 'enable_eval_rst': True, |
204 | | - }, True) |
| 205 | + app.add_config_value( |
| 206 | + "recommonmark_config", |
| 207 | + { |
| 208 | + # 'url_resolver': lambda url: github_doc_root + url, |
| 209 | + "auto_toc_tree_section": "Contents", |
| 210 | + "enable_eval_rst": True, |
| 211 | + }, |
| 212 | + True, |
| 213 | + ) |
205 | 214 | app.add_source_parser(CommonMarkParser) |
206 | 215 | app.add_transform(AutoStructify) |
0 commit comments