From 64f46835db1c364cf67c9f5fb6cb581e519b683d Mon Sep 17 00:00:00 2001 From: ddundo Date: Thu, 28 Nov 2024 21:04:00 +0000 Subject: [PATCH] #241: Fix line lengths --- goalie/function_data.py | 9 ++++++--- test/test_function_data.py | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/goalie/function_data.py b/goalie/function_data.py index ad7490d..2194bde 100644 --- a/goalie/function_data.py +++ b/goalie/function_data.py @@ -282,16 +282,19 @@ def _export_h5(self, output_fpath, export_field_types, initial_condition=None): def transfer(self, target, method="interpolate"): """ - Interpolate or project all functions from this :class:`~FunctionData` object to the target :class:`~FunctionData` object. + Interpolate or project all functions from this :class:`~FunctionData` object to + the target :class:`~FunctionData` object. - :arg target: the target :class:`~FunctionData` object to which to transfer the data + :arg target: the target :class:`~FunctionData` object to which to transfer the + data :type target: :class:`.FunctionData` :arg method: the transfer method to use, either 'interpolate' or 'project' :type method: :class:`str` """ if method not in ["interpolate", "project"]: raise ValueError( - f"Transfer method '{method}' not supported. Supported methods are 'interpolate' or 'project'." + f"Transfer method '{method}' not supported." + " Supported methods are 'interpolate' or 'project'." ) if ( diff --git a/test/test_function_data.py b/test/test_function_data.py index a79d8f9..bfebbc3 100644 --- a/test/test_function_data.py +++ b/test/test_function_data.py @@ -291,7 +291,8 @@ def test_transfer_method_error(self): self.solution_data.transfer(target_solution_data, method="invalid_method") self.assertEqual( str(cm.exception), - "Transfer method 'invalid_method' not supported. Supported methods are 'interpolate' or 'project'.", + "Transfer method 'invalid_method' not supported." + " Supported methods are 'interpolate' or 'project'.", ) def test_transfer_subintervals_error(self):