Skip to content

Commit 68b5913

Browse files
committed
REF: 3.9-friendly typing.Union
1 parent 2b6b4f2 commit 68b5913

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nipype/utils/draw_gantt_chart.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import random
99
import datetime
1010
import simplejson as json
11+
from typing import Union
1112

1213
from collections import OrderedDict
1314
from warnings import warn
@@ -103,7 +104,7 @@ def log_to_dict(logfile):
103104
nodes_list = [json.loads(l) for l in lines]
104105

105106
def _convert_string_to_datetime(
106-
datestring: str | datetime.datetime,
107+
datestring: Union[str, datetime.datetime],
107108
) -> datetime.datetime:
108109
"""Convert a date string to a datetime object."""
109110
if isinstance(datestring, datetime.datetime):

0 commit comments

Comments
 (0)