diff --git a/lib/spack/spack/patch.py b/lib/spack/spack/patch.py index e06caf5c06..c11ce9079d 100644 --- a/lib/spack/spack/patch.py +++ b/lib/spack/spack/patch.py @@ -26,7 +26,7 @@ def apply_patch( - stage: spack.stage.Stage, patch_path: str, level: int = 1, working_dir: str = "." + stage: "spack.stage.Stage", patch_path: str, level: int = 1, working_dir: str = "." ) -> None: """Apply the patch at patch_path to code in the stage. @@ -88,7 +88,7 @@ def __init__( self.level = level self.working_dir = working_dir - def apply(self, stage: spack.stage.Stage) -> None: + def apply(self, stage: "spack.stage.Stage") -> None: """Apply a patch to source in a stage. Args: @@ -247,7 +247,7 @@ def __init__( super().__init__(pkg, url, level, working_dir) self.url = url - self._stage: Optional[spack.stage.Stage] = None + self._stage: Optional["spack.stage.Stage"] = None self.ordering_key = ordering_key @@ -262,7 +262,7 @@ def __init__( raise PatchDirectiveError("URL patches require a sha256 checksum") self.sha256 = sha256 - def apply(self, stage: spack.stage.Stage) -> None: + def apply(self, stage: "spack.stage.Stage") -> None: """Apply a patch to source in a stage. Args: @@ -278,7 +278,7 @@ def apply(self, stage: spack.stage.Stage) -> None: return super().apply(stage) @property - def stage(self) -> spack.stage.Stage: + def stage(self) -> "spack.stage.Stage": """The stage in which to download (and unpack) the URL patch. Returns: