From f3ed4cd1a9319f4f92366e3de52acfaa14c5f938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Boisselier?= Date: Wed, 24 Apr 2024 14:39:16 +0200 Subject: [PATCH] fixed optional parameters --- src/is_workflow.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/is_workflow.py b/src/is_workflow.py index 5092139..06aa40b 100755 --- a/src/is_workflow.py +++ b/src/is_workflow.py @@ -142,8 +142,8 @@ class GraphCreator(abc.ABC): def _move_and_prepare_files( self, glob_pattern: str, - min_files_required: Optional[int], - custom_name_func: Optional[Callable[[Path], str]], + min_files_required: Optional[int] = None, + custom_name_func: Optional[Callable[[Path], str]] = None, ) -> list[Path]: tmp_path = Path('/tmp') globbed_files = list(tmp_path.glob(glob_pattern)) @@ -166,7 +166,7 @@ class GraphCreator(abc.ABC): lognames.append(new_file) return lognames - def _save_figure_and_cleanup(self, fig: Figure, lognames: list[Path], axis_label: Optional[str]) -> None: + def _save_figure_and_cleanup(self, fig: Figure, lognames: list[Path], axis_label: Optional[str] = None) -> None: axis_suffix = f'_{axis_label}' if axis_label else '' png_filename = self._folder / f'{self._type}_{self._graph_date}{axis_suffix}.png' fig.savefig(png_filename, dpi=self._dpi)