Skip to content

Commit eb90e5e

Browse files
rotujacobperron
authored andcommitted
Replace TypeVar with Union (#225)
1 parent f12ee98 commit eb90e5e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

colcon_core/package_identification/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import copy
55
import traceback
66
from typing import Dict
7-
from typing import TypeVar
7+
from typing import Union
88

99
from colcon_core.logging import colcon_logger
1010
from colcon_core.package_descriptor import PackageDescriptor
@@ -79,16 +79,13 @@ def get_package_identification_extensions():
7979
return order_extensions_grouped_by_priority(extensions)
8080

8181

82-
ReturnType = TypeVar('ReturnType', None, bool, PackageDescriptor)
83-
84-
8582
def identify(
8683
extensions: Dict[ # actually an OrderedDict
8784
int, # priority
8885
Dict[str, PackageIdentificationExtensionPoint], # an OrderedDict
8986
],
9087
path: str,
91-
) -> ReturnType:
88+
) -> Union[None, bool, PackageDescriptor]:
9289
"""
9390
Identify the package in the given path.
9491

0 commit comments

Comments
 (0)