remove quotes from quotes type hints
This commit is contained in:
parent
0239d77842
commit
3827ebb592
@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
GitOrStandardVersion = Union[spack.version.GitVersion, spack.version.StandardVersion]
|
GitOrStandardVersion = Union[spack.version.GitVersion, spack.version.StandardVersion]
|
||||||
|
|
||||||
TransformFunction = Callable[["spack.spec.Spec", List[AspFunction]], List[AspFunction]]
|
TransformFunction = Callable[[spack.spec.Spec, List[AspFunction]], List[AspFunction]]
|
||||||
|
|
||||||
#: Enable the addition of a runtime node
|
#: Enable the addition of a runtime node
|
||||||
WITH_RUNTIME = sys.platform != "win32"
|
WITH_RUNTIME = sys.platform != "win32"
|
||||||
@ -130,8 +130,8 @@ def __str__(self):
|
|||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def named_spec(
|
def named_spec(
|
||||||
spec: Optional["spack.spec.Spec"], name: Optional[str]
|
spec: Optional[spack.spec.Spec], name: Optional[str]
|
||||||
) -> Iterator[Optional["spack.spec.Spec"]]:
|
) -> Iterator[Optional[spack.spec.Spec]]:
|
||||||
"""Context manager to temporarily set the name of a spec"""
|
"""Context manager to temporarily set the name of a spec"""
|
||||||
if spec is None or name is None:
|
if spec is None or name is None:
|
||||||
yield spec
|
yield spec
|
||||||
@ -750,11 +750,11 @@ def on_model(model):
|
|||||||
class KnownCompiler(NamedTuple):
|
class KnownCompiler(NamedTuple):
|
||||||
"""Data class to collect information on compilers"""
|
"""Data class to collect information on compilers"""
|
||||||
|
|
||||||
spec: "spack.spec.Spec"
|
spec: spack.spec.Spec
|
||||||
os: str
|
os: str
|
||||||
target: str
|
target: str
|
||||||
available: bool
|
available: bool
|
||||||
compiler_obj: Optional["spack.compiler.Compiler"]
|
compiler_obj: Optional[spack.compiler.Compiler]
|
||||||
|
|
||||||
def _key(self):
|
def _key(self):
|
||||||
return self.spec, self.os, self.target
|
return self.spec, self.os, self.target
|
||||||
@ -1389,7 +1389,7 @@ def effect_rules(self):
|
|||||||
|
|
||||||
def define_variant(
|
def define_variant(
|
||||||
self,
|
self,
|
||||||
pkg: "Type[spack.package_base.PackageBase]",
|
pkg: Type[spack.package_base.PackageBase],
|
||||||
name: str,
|
name: str,
|
||||||
when: spack.spec.Spec,
|
when: spack.spec.Spec,
|
||||||
variant_def: vt.Variant,
|
variant_def: vt.Variant,
|
||||||
@ -1493,7 +1493,7 @@ def define_auto_variant(self, name: str, multi: bool):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
def variant_rules(self, pkg: "Type[spack.package_base.PackageBase]"):
|
def variant_rules(self, pkg: Type[spack.package_base.PackageBase]):
|
||||||
for name in pkg.variant_names():
|
for name in pkg.variant_names():
|
||||||
self.gen.h3(f"Variant {name} in package {pkg.name}")
|
self.gen.h3(f"Variant {name} in package {pkg.name}")
|
||||||
for when, variant_def in pkg.variant_definitions(name):
|
for when, variant_def in pkg.variant_definitions(name):
|
||||||
@ -1684,8 +1684,8 @@ def dependency_holds(input_spec, requirements):
|
|||||||
def _gen_match_variant_splice_constraints(
|
def _gen_match_variant_splice_constraints(
|
||||||
self,
|
self,
|
||||||
pkg,
|
pkg,
|
||||||
cond_spec: "spack.spec.Spec",
|
cond_spec: spack.spec.Spec,
|
||||||
splice_spec: "spack.spec.Spec",
|
splice_spec: spack.spec.Spec,
|
||||||
hash_asp_var: "AspVar",
|
hash_asp_var: "AspVar",
|
||||||
splice_node,
|
splice_node,
|
||||||
match_variants: List[str],
|
match_variants: List[str],
|
||||||
@ -2980,7 +2980,7 @@ def _specs_from_requires(self, pkg_name, section):
|
|||||||
for s in spec_group[key]:
|
for s in spec_group[key]:
|
||||||
yield _spec_with_default_name(s, pkg_name)
|
yield _spec_with_default_name(s, pkg_name)
|
||||||
|
|
||||||
def pkg_class(self, pkg_name: str) -> typing.Type["spack.package_base.PackageBase"]:
|
def pkg_class(self, pkg_name: str) -> typing.Type[spack.package_base.PackageBase]:
|
||||||
request = pkg_name
|
request = pkg_name
|
||||||
if pkg_name in self.explicitly_required_namespaces:
|
if pkg_name in self.explicitly_required_namespaces:
|
||||||
namespace = self.explicitly_required_namespaces[pkg_name]
|
namespace = self.explicitly_required_namespaces[pkg_name]
|
||||||
@ -3099,7 +3099,7 @@ def __init__(self, configuration) -> None:
|
|||||||
|
|
||||||
self.compilers.add(candidate)
|
self.compilers.add(candidate)
|
||||||
|
|
||||||
def with_input_specs(self, input_specs: List["spack.spec.Spec"]) -> "CompilerParser":
|
def with_input_specs(self, input_specs: List[spack.spec.Spec]) -> "CompilerParser":
|
||||||
"""Accounts for input specs when building the list of possible compilers.
|
"""Accounts for input specs when building the list of possible compilers.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -3138,7 +3138,7 @@ def with_input_specs(self, input_specs: List["spack.spec.Spec"]) -> "CompilerPar
|
|||||||
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def add_compiler_from_concrete_spec(self, spec: "spack.spec.Spec") -> None:
|
def add_compiler_from_concrete_spec(self, spec: spack.spec.Spec) -> None:
|
||||||
"""Account for compilers that are coming from concrete specs, through reuse.
|
"""Account for compilers that are coming from concrete specs, through reuse.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
Loading…
Reference in New Issue
Block a user