From 2e315e271e22c92fb2d8e20d7ae163c42937b2c2 Mon Sep 17 00:00:00 2001 From: Diptorup Deb Date: Thu, 9 Dec 2021 23:03:16 -0600 Subject: [PATCH] Fix warnings thrown during Sphinx generation.' --- docs/docfiles/urls.rst | 1 - docs/generate_rst.py | 6 ++++++ dpctl/__init__.py | 4 ++-- dpctl/_sycl_event.pyx | 4 +++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/docfiles/urls.rst b/docs/docfiles/urls.rst index d78c1ba703..25bbf743c8 100644 --- a/docs/docfiles/urls.rst +++ b/docs/docfiles/urls.rst @@ -1,4 +1,3 @@ -.. __urls: .. _buffer protocol: https://docs.python.org/3/c-api/buffer.html .. _Data API: https://data-apis.github.io/array-api/latest/ diff --git a/docs/generate_rst.py b/docs/generate_rst.py index c11c2b38fe..4e3d39d17e 100644 --- a/docs/generate_rst.py +++ b/docs/generate_rst.py @@ -527,11 +527,17 @@ def _write_function_groups_summary(o, mod, groups): _write_line(output, ".. currentmodule:: " + module) _write_empty_line(output) _write_line(output, ".. automodule:: " + module) + _write_empty_line(output) _write_submodules_summary_table(output, mod) + _write_empty_line(output) _write_classes_summary_table(output, mod) + _write_empty_line(output) _write_function_groups_summary(output, mod, _group_functions(mod)) + _write_empty_line(output) _write_enums_summary_table(output, mod) + _write_empty_line(output) _write_exceptions_summary_table(output, mod) + _write_empty_line(output) _write_include_urls(output) return output.getvalue() diff --git a/dpctl/__init__.py b/dpctl/__init__.py index 0052465b15..e3ce7907c8 100644 --- a/dpctl/__init__.py +++ b/dpctl/__init__.py @@ -133,8 +133,8 @@ def get_include(): - """ - Return the directory that contains the dpctl *.h header files. + r""" + Return the directory that contains the dpctl \*.h header files. Extension modules that need to be compiled against dpctl should use this function to locate the appropriate include directory. diff --git a/dpctl/_sycl_event.pyx b/dpctl/_sycl_event.pyx index 1d02450775..5dfb8ee10b 100644 --- a/dpctl/_sycl_event.pyx +++ b/dpctl/_sycl_event.pyx @@ -259,13 +259,15 @@ cdef class SyclEvent(_SyclEvent): **SyclEventRef**. The ownership of the pointer inside the capsule is passed to the caller, and pointer is deleted when the capsule goes out of scope. + Returns: :class:`pycapsule`: A capsule object storing a copy of the - ``cl::sycl::event`` pointer belonging to thus + ``cl::sycl::event`` pointer belonging to a :class:`dpctl.SyclEvent` instance. Raises: ValueError: If the ``DPCTLEvent_Copy`` fails to copy the ``cl::sycl::event`` pointer. + """ cdef DPCTLSyclEventRef ERef = NULL ERef = DPCTLEvent_Copy(self._event_ref)