Skip to content

Commit 495ec95

Browse files
committed
fix: add links for make sphinx work
1 parent e7727b8 commit 495ec95

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

doc/array.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,3 +308,10 @@ Generating Arrays of Random Numbers
308308
-----------------------------------
309309

310310
.. automodule:: pyopencl.clrandom
311+
312+
Type Aliases
313+
------------
314+
315+
.. class:: cl.Device
316+
317+
See :class:`pyopencl.Device`.

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
nitpick_ignore = [
2323
("py:class", r"numpy._typing._dtype_like._SupportsDType"),
2424
("py:class", r"numpy._typing._dtype_like._DTypeDict"),
25+
("py:class", r"Metafunc"),
2526
]
2627

2728
intersphinx_mapping = {

pyopencl/tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@
164164
if TYPE_CHECKING:
165165
from collections.abc import Callable, Hashable, Iterator, Mapping, Sequence
166166

167+
import pytest
167168
from numpy.typing import DTypeLike, NDArray
168-
from pytest import Metafunc
169169

170170
# Do not add a pyopencl import here: This will add an import cycle.
171171

@@ -707,7 +707,7 @@ def get_test_platforms_and_devices(
707707

708708

709709
def get_pyopencl_fixture_arg_names(
710-
metafunc: Metafunc,
710+
metafunc: pytest.Metafunc,
711711
extra_arg_names: list[str] | None = None) -> list[str]:
712712
if extra_arg_names is None:
713713
extra_arg_names = []
@@ -759,7 +759,7 @@ def idfn(val: Any) -> str:
759759
return arg_values, idfn
760760

761761

762-
def pytest_generate_tests_for_pyopencl(metafunc: Metafunc) -> None:
762+
def pytest_generate_tests_for_pyopencl(metafunc: pytest.Metafunc) -> None:
763763
"""Using the line::
764764
765765
from pyopencl.tools import pytest_generate_tests_for_pyopencl

0 commit comments

Comments
 (0)