Skip to content

Commit f3a0b69

Browse files
committed
More linter fixes.
1 parent 2a1288b commit f3a0b69

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

tests/validation/tools/combine_reports.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ def parse_report_options(values: Iterable[str]) -> Dict[str, Path]:
6262
mapping: Dict[str, Path] = {}
6363
for value in values:
6464
if "=" not in value:
65-
raise ValueError(f"Invalid --report option '{value}'. Expected format NIC=PATH.")
65+
raise ValueError(
66+
f"Invalid --report option '{value}'. Expected format NIC=PATH."
67+
)
6668
nic, raw_path = value.split("=", 1)
6769
nic = nic.strip()
6870
if not nic:
@@ -97,14 +99,21 @@ def parse_report(path: Path) -> Dict[Tuple[str, str], str]:
9799
test_name = test_name_element.get_text(separator=" ", strip=True)
98100
else:
99101
title_element = test_details.select_one(".title")
100-
test_name = title_element.get_text(separator=" ", strip=True) if title_element else "UNKNOWN"
101-
102-
results[(file_path, test_name)] = STATUS_LABELS.get(status_token, STATUS_LABELS["unknown"])
102+
test_name = (
103+
title_element.get_text(separator=" ", strip=True)
104+
if title_element
105+
else "UNKNOWN"
106+
)
107+
108+
results[(file_path, test_name)] = STATUS_LABELS.get(
109+
status_token, STATUS_LABELS["unknown"]
110+
)
103111

104112
return results
105113

106-
107-
def build_dataframe(keys: Iterable[Tuple[str, str]], data: Dict[str, Dict[Tuple[str, str], str]]) -> pd.DataFrame:
114+
def build_dataframe(
115+
keys: Iterable[Tuple[str, str]], data: Dict[str, Dict[Tuple[str, str], str]]
116+
) -> pd.DataFrame:
108117
ordered_tests = sorted(set(keys), key=lambda item: (item[0], item[1]))
109118
rows = []
110119
nic_columns = list(data.keys())

0 commit comments

Comments
 (0)