Skip to content

Commit

Permalink
style format
Browse files Browse the repository at this point in the history
  • Loading branch information
chesterxgchen committed May 8, 2024
1 parent f61e822 commit 3457535
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion nvflare/app_common/executors/task_script_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def run(self):
xs = [p for p in sys.path if self.script_full_path.startswith(p)]
import_base_path = max(xs, key=len)
raise ImportError(
f"{ie.msg}, the relative import is not support. python import is based off the sys.path: {import_base_path}")
f"{ie.msg}, the relative import is not support. python import is based off the sys.path: {import_base_path}"
)
else:
raise ie
except Exception as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def test_run_relative_import_scripts(self):
)
self.assertTrue(wrapper.script_full_path.endswith(script_path))
msg = "attempted relative import with no known parent package, the relative import is not support. python import is based off the sys.path: /home/chester/projects/NVFlare/tests/unit_test/app_common/executors/site-1/custom"
with pytest.raises(ImportError,match=msg):
with pytest.raises(ImportError, match=msg):
# check the ImportError
wrapper.run()
finally:
Expand Down

0 comments on commit 3457535

Please sign in to comment.