Skip to content

Commit 1bd7d28

Browse files
doc: fix hooks 'path' parameter doc type
by changing it from str to py.path.local (#5171)
1 parent b82e1b8 commit 1bd7d28

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/_pytest/hookspec.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def pytest_ignore_collect(path, config):
188188
189189
Stops at first non-None result, see :ref:`firstresult`
190190
191-
:param str path: the path to analyze
191+
:param path: a :py:class:`py.path.local` - the path to analyze
192192
:param _pytest.config.Config config: pytest config object
193193
"""
194194

@@ -199,15 +199,15 @@ def pytest_collect_directory(path, parent):
199199
200200
Stops at first non-None result, see :ref:`firstresult`
201201
202-
:param str path: the path to analyze
202+
:param path: a :py:class:`py.path.local` - the path to analyze
203203
"""
204204

205205

206206
def pytest_collect_file(path, parent):
207207
""" return collection Node or None for the given path. Any new node
208208
needs to have the specified ``parent`` as a parent.
209209
210-
:param str path: the path to collect
210+
:param path: a :py:class:`py.path.local` - the path to collect
211211
"""
212212

213213

@@ -249,7 +249,10 @@ def pytest_pycollect_makemodule(path, parent):
249249
The pytest_collect_file hook needs to be used if you want to
250250
create test modules for files that do not match as a test module.
251251
252-
Stops at first non-None result, see :ref:`firstresult` """
252+
Stops at first non-None result, see :ref:`firstresult`
253+
254+
:param path: a :py:class:`py.path.local` - the path of module to collect
255+
"""
253256

254257

255258
@hookspec(firstresult=True)

0 commit comments

Comments
 (0)