Skip to content

Commit c213723

Browse files
committed
py37 compatible type hints
1 parent 2131b46 commit c213723

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

Diff for: metaflow/metaflow_git.py

+2-14
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import os
99
import subprocess
1010
from os import path, name, environ
11-
from typing import TypedDict, Union
11+
from typing import Dict, Union
1212

1313
# Cache for git information to avoid repeated subprocess calls
1414
_git_info_cache = None
@@ -143,19 +143,7 @@ def _has_uncommitted_changes(path: Union[str, os.PathLike]):
143143
return None
144144

145145

146-
GitInfo = TypedDict(
147-
"GitInfo",
148-
{
149-
"repo_url": str,
150-
"branch_name": str,
151-
"commit_sha": str,
152-
"has_uncommitted_changes": bool,
153-
},
154-
total=False,
155-
)
156-
157-
158-
def get_repository_info(path: Union[str, os.PathLike]) -> GitInfo:
146+
def get_repository_info(path: Union[str, os.PathLike]) -> Dict[str, Union[str, bool]]:
159147
"""Get git repository information for a path
160148
161149
Returns:

0 commit comments

Comments
 (0)