|
90 | 90 | from .sandbox import _SandboxFlags, SandboxCommandError |
91 | 91 | from .sandbox._config import SandboxConfig |
92 | 92 | from .sandbox._sandboxremote import SandboxRemote |
93 | | -from .types import _Scope, _CacheBuildTrees, _KeyStrength, OverlapAction, _DisplayKey |
| 93 | +from .types import _HostMount, _Scope, _CacheBuildTrees, _KeyStrength, OverlapAction, _DisplayKey |
94 | 94 | from ._artifact import Artifact |
95 | 95 | from ._elementproxy import ElementProxy |
96 | 96 | from ._elementsources import ElementSources |
@@ -604,7 +604,7 @@ def stage_artifact( |
604 | 604 | sandbox: "Sandbox", |
605 | 605 | *, |
606 | 606 | path: Optional[str] = None, |
607 | | - action: str = OverlapAction.WARNING, |
| 607 | + action: OverlapAction = OverlapAction.WARNING, |
608 | 608 | include: Optional[List[str]] = None, |
609 | 609 | exclude: Optional[List[str]] = None, |
610 | 610 | orphans: bool = True, |
@@ -664,7 +664,7 @@ def stage_dependency_artifacts( |
664 | 664 | selection: Optional[Sequence["Element"]] = None, |
665 | 665 | *, |
666 | 666 | path: Optional[str] = None, |
667 | | - action: str = OverlapAction.WARNING, |
| 667 | + action: OverlapAction = OverlapAction.WARNING, |
668 | 668 | include: Optional[List[str]] = None, |
669 | 669 | exclude: Optional[List[str]] = None, |
670 | 670 | orphans: bool = True, |
@@ -864,7 +864,7 @@ def subsandbox(self, sandbox: "Sandbox") -> Iterator["Sandbox"]: |
864 | 864 | # Yields: |
865 | 865 | # (Element): The dependencies in `scope`, in deterministic staging order |
866 | 866 | # |
867 | | - def _dependencies(self, scope, *, recurse=True, visited=None): |
| 867 | + def _dependencies(self, scope: _Scope, *, recurse=True, visited=None): |
868 | 868 |
|
869 | 869 | # The format of visited is (BitMap(), BitMap()), with the first BitMap |
870 | 870 | # containing element that have been visited for the `_Scope.BUILD` case |
@@ -971,7 +971,7 @@ def _stage_artifact( |
971 | 971 | sandbox: "Sandbox", |
972 | 972 | *, |
973 | 973 | path: Optional[str] = None, |
974 | | - action: str = OverlapAction.WARNING, |
| 974 | + action: OverlapAction = OverlapAction.WARNING, |
975 | 975 | include: Optional[List[str]] = None, |
976 | 976 | exclude: Optional[List[str]] = None, |
977 | 977 | orphans: bool = True, |
@@ -2060,7 +2060,16 @@ def _push(self): |
2060 | 2060 | # usebuildtree (bool): Use the buildtree as its source |
2061 | 2061 | # |
2062 | 2062 | # Returns: Exit code |
2063 | | - def _shell(self, scope=None, *, mounts=None, isolate=False, prompt=None, command=None, usebuildtree=False): |
| 2063 | + def _shell( |
| 2064 | + self, |
| 2065 | + scope: _Scope | None = None, |
| 2066 | + *, |
| 2067 | + mounts: List[_HostMount] | None = None, |
| 2068 | + isolate: bool = False, |
| 2069 | + prompt: str | None = None, |
| 2070 | + command: List[str] | None = None, |
| 2071 | + usebuildtree: bool = False, |
| 2072 | + ): |
2064 | 2073 |
|
2065 | 2074 | with self._prepare_sandbox(scope, shell=True, usebuildtree=usebuildtree) as sandbox: |
2066 | 2075 | environment = sandbox._get_configured_environment() or self.get_environment() |
|
0 commit comments