Skip to content

Commit

Permalink
remove unneeded exception
Browse files Browse the repository at this point in the history
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
  • Loading branch information
wild-endeavor committed Oct 9, 2024
1 parent b952f8d commit dce9bf6
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions flytekit/core/promise.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,6 @@ async def binding_data_from_python_std(
return _literals_models.BindingData(scalar=lit.scalar)

Check warning on line 897 in flytekit/core/promise.py

View check run for this annotation

Codecov / codecov/patch

flytekit/core/promise.py#L896-L897

Added lines #L896 - L897 were not covered by tests


# This function cannot be called from an async call stack
def binding_from_python_std(
ctx: _flyte_context.FlyteContext,
var_name: str,
Expand All @@ -906,13 +905,6 @@ def binding_from_python_std(
t_value_type: type,
) -> Tuple[_literals_models.Binding, List[Node]]:
nodes: List[Node] = []
try:
asyncio.get_running_loop()
raise AssertionError("binding_from_python_std cannot be run from within an async call stack")
except RuntimeError as e:
if "no running event loop" not in str(e):
logger.error(f"Unknown RuntimeError {str(e)}")
raise
binding_data = run_sync(

Check warning on line 908 in flytekit/core/promise.py

View check run for this annotation

Codecov / codecov/patch

flytekit/core/promise.py#L908

Added line #L908 was not covered by tests
binding_data_from_python_std,
ctx,
Expand Down

0 comments on commit dce9bf6

Please sign in to comment.