-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtyping_helpers.py
More file actions
31 lines (27 loc) · 857 Bytes
/
typing_helpers.py
File metadata and controls
31 lines (27 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from typing import TypedDict, TypeVar
Filename = TypeVar("Filename", bound=str)
SubfolderName = TypeVar("SubfolderName", bound=str)
ContributorEmail = TypeVar("ContributorEmail", bound=str)
Contribution = TypedDict("Contribution", {"name": str, "count": int})
PorcelainLineReportLineNum = TypedDict(
"PorcelainLineReportLineNum",
{"sha": str, "linenum_original": str, "linenum_final": str, "group_count": str},
total=False,
)
PorcelainLineReport = TypedDict(
"PorcelainLineReport",
{
"line_num": PorcelainLineReportLineNum,
"code": str,
"author": str,
"author-mail": str,
"author-time": str,
"author-tz": str,
"committer": str,
"committer-mail": str,
"committer-time": str,
"committer-tz": str,
"summary": str,
"filename": str,
},
)