Skip to content

Commit 16a2510

Browse files
committed
feat: add pyi file for type hints in python
the consuming python code will have to use `from __future__ import annotations` to use the type hints since these types aren't actually defined
1 parent cc76ca7 commit 16a2510

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test_results_parser.pyi

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from typing import TypedDict, Literal
2+
3+
class Testrun(TypedDict):
4+
name: str
5+
classname: str
6+
duration: float | None
7+
outcome: Literal["pass", "failure", "skip", "error"]
8+
testsuite: str
9+
failure_message: str | None
10+
filename: str | None
11+
build_url: str | None
12+
computed_name: str | None
13+
14+
15+
class ParsingInfo(TypedDict):
16+
framework: Literal["Pytest", "Jest", "Vitest", "PHPUnit"]
17+
testruns: list[Testrun]
18+
19+
20+
def parse_raw_upload(raw_upload_bytes: bytes) -> tuple[list[ParsingInfo], bytes]: ...

0 commit comments

Comments
 (0)