From c4ee24bb28186b801bf5834191dfaec9d0e459d3 Mon Sep 17 00:00:00 2001 From: Alexander Kucera Date: Thu, 4 Jun 2026 11:10:32 +0200 Subject: [PATCH] fix(merge): resolve develop merge conflict leftovers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove duplicate load_config stub that was injected into _resolve_config_file's docstring in config.py (SyntaxError on import). Add workers attribute to 3 TestCLIHistoryResolution mocks — develop added workers resolution in cli.py but the existing tests didn't mock it, causing TypeError. --- librofm_downloader/config.py | 6 ------ tests/test_cli.py | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/librofm_downloader/config.py b/librofm_downloader/config.py index 9d21b9b..65ee987 100644 --- a/librofm_downloader/config.py +++ b/librofm_downloader/config.py @@ -43,12 +43,6 @@ class InvalidWorkersError(ConfigError): def _resolve_config_file(filename: str) -> Path | None: """Resolve a config file by searching XDG then CWD. - -def load_config(config_path: Path | str, secrets_path: Path | str) -> Config: - """Load config.yaml + secrets.yaml, merge, validate, and return Config.""" - config_path = Path(config_path) - secrets_path = Path(secrets_path) - Searches ``~/.config/librofm-downloader/`` first, then falls back to the current working directory. Auto-creates the XDG parent directory on demand. diff --git a/tests/test_cli.py b/tests/test_cli.py index 2884a7d..af68cbb 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -676,6 +676,7 @@ class TestCLIHistoryResolution: mock_config.return_value.password = "secret" mock_config.return_value._config_path = None mock_config.return_value.output_dir = "./audiobooks" + mock_config.return_value.workers = 3 mock_instance = mock_client_cls.return_value mock_instance.authenticate.return_value = "tok" @@ -711,6 +712,7 @@ class TestCLIHistoryResolution: mock_config.return_value.password = "secret" mock_config.return_value._config_path = None mock_config.return_value.output_dir = "./audiobooks" + mock_config.return_value.workers = 3 mock_instance = mock_client_cls.return_value mock_instance.authenticate.return_value = "tok" @@ -737,6 +739,7 @@ class TestCLIHistoryResolution: mock_config.return_value.password = "secret" mock_config.return_value._config_path = None mock_config.return_value.output_dir = "./audiobooks" + mock_config.return_value.workers = 3 mock_instance = mock_client_cls.return_value mock_instance.authenticate.return_value = "tok"