diff --git a/src/uwtools/drivers/driver.py b/src/uwtools/drivers/driver.py index dfdf80d44..878e44e8b 100644 --- a/src/uwtools/drivers/driver.py +++ b/src/uwtools/drivers/driver.py @@ -33,8 +33,6 @@ from uwtools.utils.file import writable from uwtools.utils.processing import run_shell_cmd -OutputT = dict[str, Union[str, list[str]]] - # NB: Class docstrings are programmatically defined. @@ -433,7 +431,7 @@ def _run_via_local_execution(self): # Public methods @property - def output(self) -> OutputT: + def output(self) -> Union[dict[str, str], dict[str, list[str]]]: """ Returns a description of the file(s) created when this component runs. """ diff --git a/src/uwtools/drivers/upp.py b/src/uwtools/drivers/upp.py index be01b903f..b57ece118 100644 --- a/src/uwtools/drivers/upp.py +++ b/src/uwtools/drivers/upp.py @@ -7,7 +7,7 @@ from iotaa import asset, task, tasks from uwtools.config.formats.nml import NMLConfig -from uwtools.drivers.driver import DriverCycleLeadtimeBased, OutputT +from uwtools.drivers.driver import DriverCycleLeadtimeBased from uwtools.drivers.support import set_driver_docstring from uwtools.exceptions import UWConfigError from uwtools.strings import STR @@ -100,7 +100,7 @@ def driver_name(cls) -> str: return STR.upp @property - def output(self) -> OutputT: + def output(self) -> dict[str, list[str]]: """ Returns a description of the file(s) created when this component runs. """ diff --git a/src/uwtools/rocoto.py b/src/uwtools/rocoto.py index 84001ccf0..180d66aaf 100644 --- a/src/uwtools/rocoto.py +++ b/src/uwtools/rocoto.py @@ -92,7 +92,7 @@ def __str__(self) -> str: xml = etree.tostring( self._root, pretty_print=True, encoding="utf-8", xml_declaration=True ).decode() - xml = re.sub(r"&([^;]+);", r"&\1;", xml) + xml = re.sub(r"&([^&]+;)", r"&\1", xml) xml = self._insert_doctype(xml) return xml diff --git a/src/uwtools/tests/fixtures/hello_workflow.yaml b/src/uwtools/tests/fixtures/hello_workflow.yaml index be9a10607..51d8691ff 100644 --- a/src/uwtools/tests/fixtures/hello_workflow.yaml +++ b/src/uwtools/tests/fixtures/hello_workflow.yaml @@ -15,9 +15,9 @@ workflow: task_hello: attrs: cycledefs: howdy - maxtries: "2" + maxtries: 2 account: "&ACCOUNT;" - command: "echo hello $person" + command: "echo account for $person is &ACCOUNT; && true" jobname: cyclestr: attrs: @@ -34,7 +34,7 @@ workflow: task_hello_#member#: attrs: cycledefs: howdy - maxtries: "1" + maxtries: 1 account: "&ACCOUNT;" command: "echo hello #member#" nodes: 1:ppn=1