From db120f72eec71e986cf3be8a0936a477d372fa52 Mon Sep 17 00:00:00 2001 From: Francesco Ballarin Date: Sun, 11 Feb 2024 11:31:52 +0100 Subject: [PATCH] Lint fixes --- .../mathrace_interaction/determine_journal_version.py | 1 - mathrace_interaction/tests/unit/test_data.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mathrace_interaction/mathrace_interaction/determine_journal_version.py b/mathrace_interaction/mathrace_interaction/determine_journal_version.py index 6b5b414..24247e8 100644 --- a/mathrace_interaction/mathrace_interaction/determine_journal_version.py +++ b/mathrace_interaction/mathrace_interaction/determine_journal_version.py @@ -97,7 +97,6 @@ def determine_journal_version(journal_filename: str) -> str: This change affects all race event codes. """ - with open(journal_filename) as journal_file: journal = [line.strip("\n") for line in journal_file.readlines()] diff --git a/mathrace_interaction/tests/unit/test_data.py b/mathrace_interaction/tests/unit/test_data.py index ba5926d..9be098d 100644 --- a/mathrace_interaction/tests/unit/test_data.py +++ b/mathrace_interaction/tests/unit/test_data.py @@ -36,7 +36,7 @@ def test_data_both_journal_and_score_files_exist( def test_data_contains_only_journal_and_score_files(data_dir: pathlib.Path) -> None: """Test that the data directory only contains journal and score files.""" - for entry in data_dir.rglob(f"*"): + for entry in data_dir.rglob("*"): assert entry.is_file() or entry.is_dir() if entry.is_file(): assert entry.suffix in (".journal", ".score") @@ -49,7 +49,7 @@ def test_data_contains_only_journal_and_score_files(data_dir: pathlib.Path) -> N def test_data_journal_all_fixture(data_dir: pathlib.Path, data_journals_all: list[pathlib.Path]) -> None: """Test that the data_journals_all fixture actually contains all journal files.""" data_journals_actual = set() - for entry in data_dir.rglob(f"*"): + for entry in data_dir.rglob("*"): assert entry.is_file() or entry.is_dir() if entry.is_file(): if entry.suffix == ".journal":