Skip to content

Commit 04b889b

Browse files
Flake8 fixes
Also made sure that __version__ and get_include is in __all__, so that their docstrings make it into the rendered autogenerated documentation.
1 parent 6f704ed commit 04b889b

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

dpctl/__init__.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919
2020
Dpctl's Python API implements Python wrappers for a subset of DPC++/SYCL's
2121
API. The Python API exposes wrappers for the SYCL runtime classes (expect
22-
`device_selector`) described in Section 4.6 of the SYCL 2020 spec (https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#_sycl_runtime_classes).
23-
Apart from the main SYCL runtime classes, dpctl includes a `memory` sub-module that exposes the SYCL USM allocators and deallocators.
22+
`device_selector`) described in Section 4.6 of the
23+
[SYCL 2020 spec](https://www.khronos.org/registry/SYCL/specs/sycl-2020/
24+
html/sycl-2020.html#_sycl_runtime_classes).
25+
Apart from the main SYCL runtime classes, dpctl includes a `memory`
26+
sub-module that exposes the SYCL USM allocators and deallocators.
2427
"""
2528
__author__ = "Intel Corp."
2629

@@ -43,18 +46,6 @@
4346
from ._version import get_versions
4447

4548

46-
__all__ = (
47-
_sycl_context__all__
48-
+ _sycl_device__all__
49-
+ _sycl_device_factory__all__
50-
+ _sycl_event__all__
51-
+ _sycl_platform__all__
52-
+ _sycl_queue__all__
53-
+ _sycl_qm__all__
54-
+ _enum_types_all__
55-
)
56-
57-
5849
def get_include():
5950
r"""
6051
Return the directory that contains the dpctl \*.h header files.
@@ -68,6 +59,18 @@ def get_include():
6859

6960

7061
__version__ = get_versions()["version"]
62+
63+
64+
__all__ = _sycl_context__all__
65+
__all__ += _sycl_device__all__
66+
__all__ += _sycl_device_factory__all__
67+
__all__ += _sycl_event__all__
68+
__all__ += _sycl_platform__all__
69+
__all__ += _sycl_queue__all__
70+
__all__ += _sycl_qm__all__
71+
__all__ += _enum_types_all__
72+
__all__ += ["__version__", "get_include"]
73+
7174
del get_versions
7275
del _sycl_context__all__
7376
del _sycl_device__all__

0 commit comments

Comments
 (0)