Skip to content

Commit fc86407

Browse files
committed
removed unions and using | operator
1 parent 1adf1bd commit fc86407

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dbldatagen/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import warnings
1616
from collections.abc import Callable
1717
from datetime import timedelta
18-
from typing import Any, Optional, Union
18+
from typing import Any, Optional
1919

2020
import jmespath
2121

@@ -91,7 +91,7 @@ def strip_margin(text: str) -> str:
9191
raise DataGenError(strip_margin(msg))
9292

9393

94-
def mkBoundsList(x: Optional[Union[int, list[int]]], default: Union[int, list[int]]) -> tuple[bool, list[int]]:
94+
def mkBoundsList(x: Optional[int | list[int]], default: int | list[int]) -> tuple[bool, list[int]]:
9595
""" make a bounds list from supplied parameter - otherwise use default
9696
9797
:param x: integer or list of 2 values that define bounds list
@@ -115,7 +115,7 @@ def topologicalSort(
115115
sources: list[tuple[str, set[str]]],
116116
initial_columns: Optional[list[str]] = None,
117117
flatten: bool = True
118-
) -> Union[list[str], list[list[str]]]:
118+
) -> list[str] | list[list[str]]:
119119
""" Perform a topological sort over sources
120120
121121
Used to compute the column test data generation order of the column generation dependencies.

0 commit comments

Comments
 (0)