From 638528b05b638d1a0468d0e170c65f682a21d2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Roos?= Date: Thu, 5 Sep 2024 16:20:14 +0200 Subject: [PATCH] run pre-commit hooks --- src/ansys/dpf/composites/example_helper/__init__.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ansys/dpf/composites/example_helper/__init__.py b/src/ansys/dpf/composites/example_helper/__init__.py index 9173652c9..8d85bb3a5 100644 --- a/src/ansys/dpf/composites/example_helper/__init__.py +++ b/src/ansys/dpf/composites/example_helper/__init__.py @@ -182,7 +182,7 @@ def _get_file_url(directory: str, filename: str) -> str: def _download_and_upload_file( - directory: str, filename: str, tmpdir: str, server: dpf.server + directory: str, filename: str, tmpdir: str, server: dpf.server ) -> str: """Download example file from example_data repo and upload it the dpf server.""" file_url = _get_file_url(directory, filename) @@ -196,8 +196,8 @@ def _download_and_upload_file( def get_short_fiber_example_files( - server: dpf.server, - example_key: str, + server: dpf.server, + example_key: str, ) -> ShortFiberCompositesFiles: """Get short fiber example file by example key. @@ -211,6 +211,7 @@ def get_short_fiber_example_files( """ example_files = _short_fiber_examples[example_key] with tempfile.TemporaryDirectory() as tmpdir: + def get_server_path(filename: str) -> str: return _download_and_upload_file(example_files.directory, filename, tmpdir, server) @@ -223,9 +224,9 @@ def get_server_path(filename: str) -> str: def get_continuous_fiber_example_files( - server: dpf.server, - example_key: str, - skip_acp_layup_files: bool = False, + server: dpf.server, + example_key: str, + skip_acp_layup_files: bool = False, ) -> ContinuousFiberCompositesFiles: """Get continuous fiber example file by example key.