Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 572bbb3

Browse filesBrowse files
authored
Merge pull request #1240 from Yobmod/addtypes
revert util.expand_path() due to regression
2 parents e76b537 + cfa3782 commit 572bbb3
Copy full SHA for 572bbb3

1 file changed

+4-7Lines changed: 4 additions & 7 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎git/util.py‎

Copy file name to clipboardExpand all lines: git/util.py
+4-7Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -381,13 +381,10 @@ def expand_path(p: PathLike, expand_vars: bool = ...) -> str:
381381

382382
def expand_path(p: Union[None, PathLike], expand_vars: bool = True) -> Optional[str]:
383383
try:
384-
if p is not None:
385-
p_out = osp.expanduser(p)
386-
if expand_vars:
387-
p_out = osp.expandvars(p_out)
388-
return osp.normpath(osp.abspath(p_out))
389-
else:
390-
return None
384+
p = osp.expanduser(p) # type: ignore
385+
if expand_vars:
386+
p = osp.expandvars(p) # type: ignore
387+
return osp.normpath(osp.abspath(p)) # type: ignore
391388
except Exception:
392389
return None
393390

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.