From 1bd7d287a78639a03d2e1ffb1b70cef407cfa5d7 Mon Sep 17 00:00:00 2001 From: DamianSkrzypczak Date: Thu, 2 May 2019 20:48:03 +0200 Subject: [PATCH 1/3] doc: fix hooks 'path' parameter doc type by changing it from str to py.path.local (#5171) --- src/_pytest/hookspec.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/_pytest/hookspec.py b/src/_pytest/hookspec.py index 5a3eb282d..02b1b4524 100644 --- a/src/_pytest/hookspec.py +++ b/src/_pytest/hookspec.py @@ -188,7 +188,7 @@ def pytest_ignore_collect(path, config): Stops at first non-None result, see :ref:`firstresult` - :param str path: the path to analyze + :param path: a :py:class:`py.path.local` - the path to analyze :param _pytest.config.Config config: pytest config object """ @@ -199,7 +199,7 @@ def pytest_collect_directory(path, parent): Stops at first non-None result, see :ref:`firstresult` - :param str path: the path to analyze + :param path: a :py:class:`py.path.local` - the path to analyze """ @@ -207,7 +207,7 @@ def pytest_collect_file(path, parent): """ return collection Node or None for the given path. Any new node needs to have the specified ``parent`` as a parent. - :param str path: the path to collect + :param path: a :py:class:`py.path.local` - the path to collect """ @@ -249,7 +249,10 @@ def pytest_pycollect_makemodule(path, parent): The pytest_collect_file hook needs to be used if you want to create test modules for files that do not match as a test module. - Stops at first non-None result, see :ref:`firstresult` """ + Stops at first non-None result, see :ref:`firstresult` + + :param path: a :py:class:`py.path.local` - the path of module to collect + """ @hookspec(firstresult=True) From 6e81c3df92977929c2d0cd15a462e1fa1b735838 Mon Sep 17 00:00:00 2001 From: DamianSkrzypczak Date: Thu, 2 May 2019 21:30:03 +0200 Subject: [PATCH 2/3] add changelog for issue #5171 fixes --- changelog/5171.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/5171.doc.rst diff --git a/changelog/5171.doc.rst b/changelog/5171.doc.rst new file mode 100644 index 000000000..7cdbad0f5 --- /dev/null +++ b/changelog/5171.doc.rst @@ -0,0 +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`` From 299e6479c161e89aeccedd510b191c908165223a Mon Sep 17 00:00:00 2001 From: DamianSkrzypczak Date: Thu, 2 May 2019 23:45:34 +0200 Subject: [PATCH 3/3] add DamianSkrzypczak to AUTHORS --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index b9879804a..577c4dcd1 100644 --- a/AUTHORS +++ b/AUTHORS @@ -59,6 +59,7 @@ Christopher Gilling Christopher Dignam CrazyMerlyn Cyrus Maden +Damian Skrzypczak Dhiren Serai Daniel Grana Daniel Hahler