Skip to content

Commit 7f98b18

Browse files
fix tests
1 parent adc6601 commit 7f98b18

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def log_title(title: str, title_len: int = TITLE_LEN):
2727
@staticmethod
2828
def log_to_csv(csv_name: str, field_names: tuple[str], row: dict | None = None):
2929
field_names = list(map(lambda x: x.replace('_', ''), field_names))
30+
if row is not None:
31+
row = {k.replace('_', ''): v for k, v in row.items()}
3032
if isinstance(row, dict):
3133
with open(csv_name, 'a', encoding='utf-8', newline='') as file:
3234
writer = csv.DictWriter(file, fieldnames=field_names)

0 commit comments

Comments
 (0)