From 1b9fb96a0f10bc2214ab9785cb295e5f7339dd79 Mon Sep 17 00:00:00 2001 From: tusenka Date: Thu, 28 Nov 2024 19:16:28 +0300 Subject: [PATCH 1/2] add inline comment to main.py --- src/_pytest/main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/_pytest/main.py b/src/_pytest/main.py index e5534e98d69..00f93f484fe 100644 --- a/src/_pytest/main.py +++ b/src/_pytest/main.py @@ -241,7 +241,15 @@ def pytest_addoption(parser: Parser) -> None: ), ) + """Check basetemp dir + :param path: + Path to the basetemp [str] + Returns path if all the path is not empty and do not ancestor by symlink + raises argparse.ArgumentTypeError in in case of path is empty or is an ancestor of the basetemp + """ + + # Disable since functions handle it themselves. def validate_basetemp(path: str) -> str: # GH 7119 msg = "basetemp must not be empty, the current working directory or any parent directory of it" From efc63bafac3e4509e0ef47c2309e121d464c803a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 16:20:30 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/_pytest/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/_pytest/main.py b/src/_pytest/main.py index 00f93f484fe..3639a9df407 100644 --- a/src/_pytest/main.py +++ b/src/_pytest/main.py @@ -246,10 +246,12 @@ def pytest_addoption(parser: Parser) -> None: :param path: Path to the basetemp [str] Returns path if all the path is not empty and do not ancestor by symlink - raises argparse.ArgumentTypeError in in case of path is empty or is an ancestor of the basetemp + raises argparse.ArgumentTypeError in in case of path is empty or is an ancestor of the basetemp """ # Disable since functions handle it themselves. + + def validate_basetemp(path: str) -> str: # GH 7119 msg = "basetemp must not be empty, the current working directory or any parent directory of it"