diff --git a/dump_channel_to_fs.py b/dump_channel_to_fs.py index ad32cc0..4c67395 100755 --- a/dump_channel_to_fs.py +++ b/dump_channel_to_fs.py @@ -44,7 +44,7 @@ def download_if_missing(url, fpath, fsize=None, *, force=False): if not skipped: fpath.unlink(missing_ok=True) wget = subprocess.run( - [ # noqa: S603 + [ "/usr/bin/env", "wget", "-t", diff --git a/hatch_build.py b/hatch_build.py index 1ecbbe0..314e24a 100644 --- a/hatch_build.py +++ b/hatch_build.py @@ -29,7 +29,7 @@ def initialize(self, version, build_data): return Path(self.root).joinpath("src/kolibri2zim/templates/assets") subprocess.run( - str(Path(self.root).joinpath("get_js_deps.sh")), # noqa : S603 + str(Path(self.root).joinpath("get_js_deps.sh")), # : S603 check=True, ) return super().initialize(version, build_data) diff --git a/src/kolibri2zim/entrypoint.py b/src/kolibri2zim/entrypoint.py index 856bea2..34bc34b 100755 --- a/src/kolibri2zim/entrypoint.py +++ b/src/kolibri2zim/entrypoint.py @@ -206,7 +206,7 @@ def main(): logger.error(f"FAILED. An error occurred: {exc}") if args.debug: logger.exception(exc) - raise SystemExit(1) + raise SystemExit(1) from exc if __name__ == "__main__": diff --git a/tests/conftest.py b/tests/conftest.py index 0210377..af47abf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -35,12 +35,13 @@ def _scraper( channel_name: str = CHANNEL_NAME, channel_description: str = CHANNEL_DESCRIPTION, channel_author: str | None = None, - additional_options: dict[str, Any] = {}, + additional_options: dict[str, Any] | None = None, ) -> Kolibri2Zim: options = {} for option_key in expected_options_keys: options[option_key] = None - options.update(additional_options) + if additional_options: + options.update(additional_options) scraper = Kolibri2Zim(**options) scraper.db = FakeDb( channel_author=channel_author, @@ -50,11 +51,3 @@ def _scraper( return scraper yield _scraper - - -# @pytest.fixture -# def default_options() -> Generator[dict[str, Any], None, None]: -# default_options = {} -# for option in options: -# default_options[option] = None -# yield default_options