Skip to content

Commit 1c13418

Browse files
authored
doc: fix hooks 'path' parameter doc type (#5198)
doc: fix hooks 'path' parameter doc type
2 parents b82e1b8 + 299e647 commit 1c13418

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Christopher Gilling
5959
Christopher Dignam
6060
CrazyMerlyn
6161
Cyrus Maden
62+
Damian Skrzypczak
6263
Dhiren Serai
6364
Daniel Grana
6465
Daniel Hahler

changelog/5171.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Doc: ``pytest_ignore_collect``, ``pytest_collect_directory``, ``pytest_collect_file`` and ``pytest_pycollect_makemodule`` hooks's 'path' parameter documented type is now ``py.path.local``

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)