|
21 | 21 |
|
22 | 22 | now = datetime.datetime.now()
|
23 | 23 |
|
24 |
| -project = 'oneAPI DPC++ Compiler' |
25 |
| -copyright = str(now.year) + ', Intel Corporation' |
26 |
| -author = 'Intel Corporation' |
| 24 | +project = "oneAPI DPC++ Compiler" |
| 25 | +copyright = str(now.year) + ", Intel Corporation" |
| 26 | +author = "Intel Corporation" |
27 | 27 |
|
28 | 28 | # -- General configuration ---------------------------------------------------
|
29 | 29 |
|
30 |
| -master_doc = 'index' |
| 30 | +master_doc = "index" |
31 | 31 |
|
32 | 32 | # Add any Sphinx extension module names here, as strings. They can be
|
33 | 33 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
34 | 34 | # ones.
|
35 |
| -extensions = [ |
36 |
| - 'myst_parser' |
37 |
| -] |
| 35 | +extensions = ["myst_parser"] |
38 | 36 |
|
39 | 37 | # Implicit targets for cross reference
|
40 | 38 | myst_heading_anchors = 5
|
41 | 39 |
|
42 | 40 | # The name of the Pygments (syntax highlighting) style to use.
|
43 |
| -pygments_style = 'friendly' |
| 41 | +pygments_style = "friendly" |
44 | 42 |
|
45 | 43 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
46 | 44 | # a list of builtin themes.
|
47 |
| -html_theme = 'haiku' |
| 45 | +html_theme = "haiku" |
48 | 46 |
|
49 | 47 | # The suffix of source filenames.
|
50 |
| -source_suffix = ['.rst', '.md'] |
| 48 | +source_suffix = [".rst", ".md"] |
51 | 49 |
|
52 | 50 | exclude_patterns = [
|
53 | 51 | # Extensions are mostly in asciidoc which has poor support in Sphinx.
|
54 |
| - 'extensions/*', |
55 |
| - 'design/opencl-extensions/*', |
56 |
| - 'design/spirv-extensions/*', |
57 |
| - |
| 52 | + "extensions/*", |
| 53 | + "design/opencl-extensions/*", |
| 54 | + "design/spirv-extensions/*", |
58 | 55 | # Sphinx complains about syntax errors in these files.
|
59 |
| - 'design/DeviceLibExtensions.rst', |
60 |
| - 'design/SYCLPipesLoweringToSPIRV.rst', |
61 |
| - 'design/fpga_io_pipes_design.rst', |
62 |
| - 'design/Reduction_status.md' |
| 56 | + "design/DeviceLibExtensions.rst", |
| 57 | + "design/SYCLPipesLoweringToSPIRV.rst", |
| 58 | + "design/fpga_io_pipes_design.rst", |
| 59 | + "design/Reduction_status.md", |
63 | 60 | ]
|
64 | 61 |
|
65 |
| -suppress_warnings = [ 'misc.highlighting_failure' ] |
| 62 | +suppress_warnings = ["misc.highlighting_failure"] |
| 63 | + |
66 | 64 |
|
67 | 65 | def on_missing_reference(app, env, node, contnode):
|
68 | 66 | # Get the directory that contains the *source* file of the link. These
|
69 | 67 | # files are always relative to the directory containing "conf.py"
|
70 | 68 | # (<top>/sycl/doc). For example, the file "sycl/doc/design/foo.md" will
|
71 | 69 | # have a directory "design".
|
72 |
| - refdoc_components = node['refdoc'].split('/') |
73 |
| - dirs = '/'.join(refdoc_components[:-1]) |
74 |
| - if dirs: dirs += '/' |
| 70 | + refdoc_components = node["refdoc"].split("/") |
| 71 | + dirs = "/".join(refdoc_components[:-1]) |
| 72 | + if dirs: |
| 73 | + dirs += "/" |
75 | 74 |
|
76 | 75 | # A missing reference usually occurs when the target file of the link is
|
77 | 76 | # not processed by Sphinx. Compensate by creating a link that goes to the
|
78 | 77 | # file's location in the GitHub repo.
|
79 |
| - new_target = "https://github.com/intel/llvm/tree/sycl/sycl/doc/" + dirs + \ |
80 |
| - node['reftarget'] |
| 78 | + new_target = ( |
| 79 | + "https://github.com/intel/llvm/tree/sycl/sycl/doc/" + dirs + node["reftarget"] |
| 80 | + ) |
81 | 81 |
|
82 |
| - newnode = nodes.reference('', '', internal=False, refuri=new_target) |
| 82 | + newnode = nodes.reference("", "", internal=False, refuri=new_target) |
83 | 83 | newnode.append(contnode)
|
84 | 84 | return newnode
|
85 | 85 |
|
| 86 | + |
86 | 87 | def setup(app):
|
87 |
| - app.connect('missing-reference', on_missing_reference) |
| 88 | + app.connect("missing-reference", on_missing_reference) |
0 commit comments