diff options
Diffstat (limited to 'continuedev/src')
| -rw-r--r-- | continuedev/src/continuedev/core/abstract_sdk.py | 6 | ||||
| -rw-r--r-- | continuedev/src/continuedev/core/sdk.py | 4 | ||||
| -rw-r--r-- | continuedev/src/continuedev/steps/core/core.py | 4 | 
3 files changed, 7 insertions, 7 deletions
| diff --git a/continuedev/src/continuedev/core/abstract_sdk.py b/continuedev/src/continuedev/core/abstract_sdk.py index 9278f873..1c800875 100644 --- a/continuedev/src/continuedev/core/abstract_sdk.py +++ b/continuedev/src/continuedev/core/abstract_sdk.py @@ -1,5 +1,5 @@  from abc import ABC, abstractmethod -from typing import Coroutine, List +from typing import Coroutine, List, Union  from .config import ContinueConfig  from ..models.filesystem_edit import FileSystemEdit @@ -45,7 +45,7 @@ class AbstractContinueSDK(ABC):          pass      @abstractmethod -    async def run(self, commands: List[str] | str, cwd: str = None): +    async def run(self, commands: Union[List[str], str], cwd: str = None):          pass      @abstractmethod @@ -57,7 +57,7 @@ class AbstractContinueSDK(ABC):          pass      @abstractmethod -    async def add_file(self, filename: str, content: str | None): +    async def add_file(self, filename: str, content: Union[str, None]):          pass      @abstractmethod diff --git a/continuedev/src/continuedev/core/sdk.py b/continuedev/src/continuedev/core/sdk.py index 5bd77d11..8317a3d1 100644 --- a/continuedev/src/continuedev/core/sdk.py +++ b/continuedev/src/continuedev/core/sdk.py @@ -73,7 +73,7 @@ class ContinueSDK(AbstractContinueSDK):      async def wait_for_user_confirmation(self, prompt: str):          return await self.run_step(WaitForUserConfirmationStep(prompt=prompt)) -    async def run(self, commands: List[str] | str, cwd: str = None): +    async def run(self, commands: Union[List[str], str], cwd: str = None):          commands = commands if isinstance(commands, List) else [commands]          return await self.run_step(ShellCommandsStep(cmds=commands, cwd=cwd)) @@ -93,7 +93,7 @@ class ContinueSDK(AbstractContinueSDK):          file_edit = FileEdit.from_append(filepath, previous_content, content)          await self.ide.applyFileSystemEdit(file_edit) -    async def add_file(self, filename: str, content: str | None): +    async def add_file(self, filename: str, content: Union[str, None]):          filepath = await self._ensure_absolute_path(filename)          return await self.run_step(FileSystemEditStep(edit=AddFile(filepath=filepath, content=content))) diff --git a/continuedev/src/continuedev/steps/core/core.py b/continuedev/src/continuedev/steps/core/core.py index 04446787..ad468595 100644 --- a/continuedev/src/continuedev/steps/core/core.py +++ b/continuedev/src/continuedev/steps/core/core.py @@ -40,10 +40,10 @@ class FileSystemEditStep(ReversibleStep):  class ShellCommandsStep(Step):      cmds: List[str] -    cwd: str | None = None +    cwd: Union[str, None] = None      name: str = "Run Shell Commands" -    _err_text: str | None = None +    _err_text: Union[str, None] = None      async def describe(self, models: Models) -> Coroutine[str, None, None]:          if self._err_text is not None: | 
