Skip to content

Commit

Permalink
Update typing hint for WCOSS version of python (#2238)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
KateFriedman-NOAA authored Jan 19, 2024
1 parent 4919287 commit d4c55d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion workflow/rocoto/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from applications.applications import AppConfig
import rocoto.rocoto as rocoto
from wxflow import Template, TemplateConstants, to_timedelta
from typing import List

__all__ = ['Tasks']

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

@staticmethod
def _get_forecast_hours(cdump, config) -> list[str]:
def _get_forecast_hours(cdump, config) -> List[str]:
fhmin = config['FHMIN']
fhmax = config['FHMAX']
fhout = config['FHOUT']
Expand Down

0 comments on commit d4c55d1

Please sign in to comment.