Skip to content

Commit 2b3b0ba

Browse files
committed
Update the CI typechecking
Signed-off-by: Zelin Hao <[email protected]>
1 parent 986736d commit 2b3b0ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ci_workflow/ci_manifests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import re
99
from io import TextIOWrapper
10-
from typing import Any
10+
from typing import Union, Type
1111

1212
from ci_workflow.ci_args import CiArgs
1313
from ci_workflow.ci_input_manifest import CiInputManifest
@@ -16,12 +16,12 @@
1616

1717
class CiManifests:
1818
@staticmethod
19-
def __klass(filename: str) -> Any:
19+
def __klass(filename: str) -> Union[Type[CiTestManifest], Type[CiInputManifest]]:
2020
if re.search("-test.yml$", filename):
2121
return CiTestManifest
2222
else:
2323
return CiInputManifest
2424

2525
@classmethod
26-
def from_file(cls, file: TextIOWrapper, args: CiArgs) -> Any:
26+
def from_file(cls, file: TextIOWrapper, args: CiArgs) -> Union[CiTestManifest, CiInputManifest]:
2727
return cls.__klass(file.name)(file, args)

0 commit comments

Comments
 (0)