Skip to content

Commit 6cd3b23

Browse files
committed
formatting
1 parent 487857f commit 6cd3b23

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

python_files/vscode_pytest/__init__.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ def pytest_sessionfinish(session, exitstatus):
532532
def construct_nested_folders(
533533
file_nodes_dict: dict[str, TestNode],
534534
session_node: TestNode, # session_node['path'] is a pathlib.Path object
535-
session_children_dict: dict[str, TestNode]
535+
session_children_dict: dict[str, TestNode],
536536
) -> dict[str, TestNode]:
537537
"""Iterate through all files and construct them into nested folders.
538538
@@ -582,7 +582,7 @@ def process_parameterized_test(
582582
test_case: pytest.Item, # Must have callspec attribute (parameterized test)
583583
test_node: TestItem,
584584
function_nodes_dict: dict[str, TestNode],
585-
file_nodes_dict: dict[str, TestNode]
585+
file_nodes_dict: dict[str, TestNode],
586586
) -> TestNode:
587587
"""Process a parameterized test case and create appropriate function nodes.
588588
@@ -670,7 +670,9 @@ def build_test_tree(session: pytest.Session) -> TestNode:
670670
test_node = create_test_node(test_case)
671671
if hasattr(test_case, "callspec"): # This means it is a parameterized test.
672672
# Process parameterized test and get the function node to use for further processing
673-
test_node = process_parameterized_test(test_case, test_node, function_nodes_dict, file_nodes_dict)
673+
test_node = process_parameterized_test(
674+
test_case, test_node, function_nodes_dict, file_nodes_dict
675+
)
674676
if isinstance(test_case.parent, pytest.Class) or (
675677
USES_PYTEST_DESCRIBE and isinstance(test_case.parent, DescribeBlock)
676678
):
@@ -718,7 +720,9 @@ def build_test_tree(session: pytest.Session) -> TestNode:
718720
file_nodes_dict[os.fspath(parent_path)] = parent_test_case
719721
parent_test_case["children"].append(test_node)
720722
# Process all files and construct them into nested folders
721-
session_children_dict = construct_nested_folders(file_nodes_dict, session_node, session_children_dict)
723+
session_children_dict = construct_nested_folders(
724+
file_nodes_dict, session_node, session_children_dict
725+
)
722726
session_node["children"] = list(session_children_dict.values())
723727
return session_node
724728

@@ -907,7 +911,14 @@ class CoveragePayloadDict(Dict):
907911
error: str | None # Currently unused need to check
908912

909913

910-
def get_node_path(node: pytest.Session | pytest.Item | pytest.File | pytest.Class | pytest.Module | HasPathOrFspath) -> pathlib.Path:
914+
def get_node_path(
915+
node: pytest.Session
916+
| pytest.Item
917+
| pytest.File
918+
| pytest.Class
919+
| pytest.Module
920+
| HasPathOrFspath,
921+
) -> pathlib.Path:
911922
"""A function that returns the path of a node given the switch to pathlib.Path.
912923
913924
It also evaluates if the node is a symlink and returns the equivalent path.

0 commit comments

Comments
 (0)