Skip to content

Commit 19f8059

Browse files
Fixed docstrings of inspection API class and methods
Since resulting docstrings are long, added flake8 exceptions
1 parent dd46535 commit 19f8059

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ per-file-ignores =
3030
dpctl/tests/_cython_api.pyx: E999, E225, E227, E402
3131
dpctl/utils/_compute_follows_data.pyx: E999, E225, E227
3232
dpctl/utils/_onetrace_context.py: E501, W505
33+
dpctl/tensor/_array_api.py: E501, W505
3334
examples/cython/sycl_buffer/syclbuffer/_buffer_example.pyx: E999, E225, E402
3435
examples/cython/usm_memory/blackscholes/blackscholes.pyx: E999, E225, E226, E402
3536
examples/cython/use_dpctl_sycl/use_dpctl_sycl/_cython_api.pyx: E999, E225, E226, E402

dpctl/tensor/_array_api.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ def default_dtypes(self, *, device=None):
107107
Returns a dictionary of default data types for ``device``.
108108
109109
Args:
110-
device (Optional[:class:`dpctl.SyclDevice`,
111-
:class:`dpctl.SyclQueue`, :class:`dpctl.tensor.Device`]):
110+
device (Optional[:class:`dpctl.SyclDevice`, :class:`dpctl.SyclQueue`, :class:`dpctl.tensor.Device`]):
112111
array API concept of device used in getting default data types.
113112
``device`` can be ``None`` (in which case the default device
114113
is used), an instance of :class:`dpctl.SyclDevice` corresponding
@@ -119,7 +118,8 @@ def default_dtypes(self, *, device=None):
119118
120119
Returns:
121120
dict:
122-
a dictionary of default data types for ``device``
121+
a dictionary of default data types for ``device``:
122+
123123
- ``"real floating"``: dtype
124124
- ``"complex floating"``: dtype
125125
- ``"integral"``: dtype
@@ -143,15 +143,12 @@ def dtypes(self, *, device=None, kind=None):
143143
Returns a dictionary of all Array API data types of a specified
144144
``kind`` supported by ``device``
145145
146-
This dictionary only includes data types supported by the array API.
147-
148-
See [array API](array_api).
149-
150-
[array_api]: https://data-apis.org/array-api/latest/
146+
This dictionary only includes data types supported by the
147+
`Python Array API <https://data-apis.org/array-api/latest/>`_
148+
specification.
151149
152150
Args:
153-
device (Optional[:class:`dpctl.SyclDevice`,
154-
:class:`dpctl.SyclQueue`, :class:`dpctl.tensor.Device`, str]):
151+
device (Optional[:class:`dpctl.SyclDevice`, :class:`dpctl.SyclQueue`, :class:`dpctl.tensor.Device`, str]):
155152
array API concept of device used in getting default data types.
156153
``device`` can be ``None`` (in which case the default device is
157154
used), an instance of :class:`dpctl.SyclDevice` corresponding
@@ -167,6 +164,7 @@ def dtypes(self, *, device=None, kind=None):
167164
types supported by `device`
168165
- if ``kind`` is a string, returns a dictionary containing the
169166
data types belonging to the data type kind specified.
167+
170168
Supports:
171169
172170
- ``"bool"``

0 commit comments

Comments
 (0)