summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2024-03-06 02:26:44 +0100
committerGitHub <noreply@github.com>2024-03-05 17:26:44 -0800
commit9d962f55b0bc2de6385721a3a6df997d6a0af57d (patch)
tree218bdf76d244647346240dbcc8b0bab87752d837 /lib
parent00d3066b97a37008574c10d2faacab4cb7e99374 (diff)
downloadspack-9d962f55b0bc2de6385721a3a6df997d6a0af57d.tar.gz
spack-9d962f55b0bc2de6385721a3a6df997d6a0af57d.tar.bz2
spack-9d962f55b0bc2de6385721a3a6df997d6a0af57d.tar.xz
spack-9d962f55b0bc2de6385721a3a6df997d6a0af57d.zip
spack.patch: fix type hint circular import (#43041)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/patch.py10
1 files changed, 5 insertions, 5 deletions
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 @@ from spack.util.executable import which, which_string
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 @@ class Patch:
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 @@ class UrlPatch(Patch):
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 @@ class UrlPatch(Patch):
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 @@ class UrlPatch(Patch):
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: