Skip to content

Commit

Permalink
adjust memray_reporter_args type
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Fiedler <[email protected]>
  • Loading branch information
fiedlerNr9 committed Oct 29, 2024
1 parent 5bb70ed commit 5ed181e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/flytekit-memray/flytekitplugins/memray/profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(
self,
task_function: Optional[Callable] = None,
memray_html_reporter: str = "flamegraph",
memray_reporter_args: List[str] = [],
memray_reporter_args: Optional[List[str]] = None,
):
"""Memray profiling plugin.
Args:
Expand All @@ -29,7 +29,7 @@ def __init__(
f"{memray_html_reporter} is not a supported html reporter."
)

if not all(
if memray_reporter_args is not None and not all(
isinstance(arg, str) and "--" in arg for arg in memray_reporter_args
):
raise ValueError(
Expand All @@ -38,7 +38,7 @@ def __init__(

self.dir_name = "memray"
self.memray_html_reporter = memray_html_reporter
self.memray_reporter_args = memray_reporter_args
self.memray_reporter_args = memray_reporter_args if memray_reporter_args else []

super().__init__(
task_function,
Expand Down

0 comments on commit 5ed181e

Please sign in to comment.