Skip to content

Commit

Permalink
#241: Fix line lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
ddundo committed Nov 28, 2024
1 parent 2b7a72f commit 64f4683
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions goalie/function_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
3 changes: 2 additions & 1 deletion test/test_function_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 64f4683

Please sign in to comment.