From 6a81526e359351db33b0f316b4d837ea2959bab9 Mon Sep 17 00:00:00 2001 From: Bart Schilperoort Date: Mon, 20 Nov 2023 10:45:18 +0100 Subject: [PATCH 1/2] Change list to tuple in get_*_var_names docstring --- src/bmipy/bmi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bmipy/bmi.py b/src/bmipy/bmi.py index f8d3811..6a6b4fc 100644 --- a/src/bmipy/bmi.py +++ b/src/bmipy/bmi.py @@ -104,14 +104,14 @@ def get_output_item_count(self) -> int: @abstractmethod def get_input_var_names(self) -> tuple[str]: - """List of a model's input variables. + """Get the model's input variables. Input variable names must be CSDMS Standard Names, also known as *long variable names*. Returns ------- - list of str + tuple of str The input variables for the model. Notes @@ -127,14 +127,14 @@ def get_input_var_names(self) -> tuple[str]: @abstractmethod def get_output_var_names(self) -> tuple[str]: - """List of a model's output variables. + """Get the model's output variables. Output variable names must be CSDMS Standard Names, also known as *long variable names*. Returns ------- - list of str + tuple of str The output variables for the model. """ ... From c9425dafd940010b90e6ffa02abf6113959f93ef Mon Sep 17 00:00:00 2001 From: Bart Schilperoort Date: Wed, 22 Nov 2023 16:32:49 +0100 Subject: [PATCH 2/2] Fix tuple of strings type hint --- src/bmipy/bmi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bmipy/bmi.py b/src/bmipy/bmi.py index 6a6b4fc..41ed450 100644 --- a/src/bmipy/bmi.py +++ b/src/bmipy/bmi.py @@ -103,7 +103,7 @@ def get_output_item_count(self) -> int: ... @abstractmethod - def get_input_var_names(self) -> tuple[str]: + def get_input_var_names(self) -> tuple[str, ...]: """Get the model's input variables. Input variable names must be CSDMS Standard Names, also known @@ -126,7 +126,7 @@ def get_input_var_names(self) -> tuple[str]: ... @abstractmethod - def get_output_var_names(self) -> tuple[str]: + def get_output_var_names(self) -> tuple[str, ...]: """Get the model's output variables. Output variable names must be CSDMS Standard Names, also known