Skip to content

Commit

Permalink
Avoid circular import #28
Browse files Browse the repository at this point in the history
  • Loading branch information
fqqb committed Aug 20, 2024
1 parent 8770f56 commit 36e8dcc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion yamcs-client/src/yamcs/tmtc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import threading
from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Union

from yamcs.client.activities import ScriptActivity
from yamcs.core.context import Context
from yamcs.core.exceptions import YamcsError
from yamcs.core.futures import WebSocketSubscriptionFuture
Expand Down Expand Up @@ -799,6 +798,11 @@ def run_script(self, script: str, args: Optional[Union[str, List[str]]] = None):
:param args:
Optional script arguments, passed verbatim in the command line.
"""

# Local import to avoid circularity while the yamcs.client
# package migration is going on.
from yamcs.client.activities import ScriptActivity

url = f"/activities/{self._instance}/activities"
activity = ScriptActivity(script=script, args=args, processor=self._processor)
req = activity._to_proto()
Expand Down

0 comments on commit 36e8dcc

Please sign in to comment.