Skip to content

Commit d4c55d1

Browse files
Update typing hint for WCOSS version of python (NOAA-EMC#2238)
The typing hint `typing.List` was deprecated with python 3.9 in favor of using the primitive `list[str]`, but the functional version of python on WCOSS2 is <3.9, causing `setup_xml.py` to fail there. This replaces `list[str]` as a typing hint with the deprecated form until the supported version on WCOSS2 is >=3.9.
1 parent 4919287 commit d4c55d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

workflow/rocoto/tasks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from applications.applications import AppConfig
55
import rocoto.rocoto as rocoto
66
from wxflow import Template, TemplateConstants, to_timedelta
7+
from typing import List
78

89
__all__ = ['Tasks']
910

@@ -124,7 +125,7 @@ def _template_to_rocoto_cycstring(self, template: str, subs_dict: dict = {}) ->
124125
rocoto_conversion_dict.get)
125126

126127
@staticmethod
127-
def _get_forecast_hours(cdump, config) -> list[str]:
128+
def _get_forecast_hours(cdump, config) -> List[str]:
128129
fhmin = config['FHMIN']
129130
fhmax = config['FHMAX']
130131
fhout = config['FHOUT']

0 commit comments

Comments
 (0)