From e5aacc6ac9ef6aae7b8c6253b902dd1c3eeb9bc5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 21 Apr 2023 18:24:57 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/_pytest/nodes.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/_pytest/nodes.py b/src/_pytest/nodes.py index 5e8c8be82..d54ed9cf5 100644 --- a/src/_pytest/nodes.py +++ b/src/_pytest/nodes.py @@ -69,27 +69,27 @@ def iterparentnodeids(nodeid: str) -> Iterator[str]: # The root Session node - always present. yield "" - if nodeid == '': + if nodeid == "": return - if nodeid.startswith('::'): + if nodeid.startswith("::"): # Weird case of '::x' (no path) yield nodeid return - path, sep, node = nodeid.partition('::') + path, sep, node = nodeid.partition("::") sections = path.split(SEP) for i, _ in enumerate(sections, start=1): yield SEP.join(sections[:i]) - if sep == '': + if sep == "": # Only a path return - nodes = node.split('::') + nodes = node.split("::") for i, _ in enumerate(nodes, start=1): - yield '::'.join([path] + nodes[:i]) + yield "::".join([path] + nodes[:i]) def _check_path(path: Path, fspath: LEGACY_PATH) -> None: