curved-television-6568
12/15/2021, 3:52 PMcurved-television-6568
12/15/2021, 3:52 PM@@ -2,7 +2,7 @@ from __future__ import annotations
import os.path
from dataclasses import dataclass
-from typing import Any, Iterable, Union
+from typing import Any, Iterable, Optional, Union
from pants.base.build_environment import get_buildroot
from pants.engine.addresses import Address
@@ -98,8 +98,8 @@ Example:
@classmethod
def compute_value(
- cls, raw_value: Iterable[str | CustomBuildStage] | None, address: Address
- ) -> tuple[str | CustomBuildStage, ...] | None:
+ cls, raw_value: Optional[Iterable[Union[str, CustomBuildStage]]], address: Address
+ ) -> Optional[tuple[Union[str, CustomBuildStage], ...]]:
raw_or_default = super().compute_value(raw_value, address)
curved-television-6568
12/15/2021, 3:52 PM16:46:11.12 [ERROR] unsupported operand type(s) for |: 'type' and 'type'
Traceback (most recent call last):
File "/Users/aadt/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.vVzmYz/install/lib/python3.9/site-packages/pants/bin/daemon_pants_runner.py", line 132, in single_daemonized_run
return runner.run(start_time)
File "/Users/aadt/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.vVzmYz/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 263, in run
engine_result = self._run_inner()
File "/Users/aadt/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.vVzmYz/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 229, in _run_inner
return self._print_help(self.options.help_request)
File "/Users/aadt/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.vVzmYz/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 204, in _print_help
all_help_info = HelpInfoExtracter.get_all_help_info(
File "/Users/aadt/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.vVzmYz/install/lib/python3.9/site-packages/pants/help/help_info_extracter.py", line 269, in get_all_help_info
name_to_target_type_info = {
File "/Users/aadt/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.vVzmYz/install/lib/python3.9/site-packages/pants/help/help_info_extracter.py", line 270, in <dictcomp>
alias: TargetTypeHelpInfo.create(target_type, union_membership=union_membership)
File "/Users/aadt/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.vVzmYz/install/lib/python3.9/site-packages/pants/help/help_info_extracter.py", line 205, in create
fields=tuple(
File "/Users/aadt/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.vVzmYz/install/lib/python3.9/site-packages/pants/help/help_info_extracter.py", line 206, in <genexpr>
TargetFieldHelpInfo.create(field)
File "/Users/aadt/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.vVzmYz/install/lib/python3.9/site-packages/pants/help/help_info_extracter.py", line 158, in create
raw_value_type = get_type_hints(field.compute_value)["raw_value"]
File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 1469, in get_type_hints
value = _eval_type(value, globalns, localns)
File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 290, in _eval_type
return t._evaluate(globalns, localns, recursive_guard)
File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 551, in _evaluate
eval(self.__forward_code__, globalns, localns),
File "<string>", line 1, in <module>
TypeError: unsupported operand type(s) for |: 'type' and 'type'
curved-television-6568
12/15/2021, 3:52 PMcurved-television-6568
12/15/2021, 3:53 PMhundreds-father-404
12/15/2021, 3:53 PMcurved-television-6568
12/15/2021, 3:53 PMhundreds-father-404
12/15/2021, 3:53 PMhundreds-father-404
12/15/2021, 3:54 PMcurved-television-6568
12/15/2021, 3:54 PMhundreds-father-404
12/15/2021, 3:55 PMenough-analyst-54434
12/15/2021, 4:00 PM