Refactor: More f-string for kittens

This commit is contained in:
pagedown
2022-01-29 20:23:34 +08:00
parent 4110074580
commit 4a3ed62809
18 changed files with 32 additions and 32 deletions

View File

@@ -101,7 +101,7 @@ def remote_hostname(path: str) -> Tuple[Optional[str], Optional[str]]:
def resolve_remote_name(path: str, default: str) -> str:
remote_dir, rh = remote_hostname(path)
if remote_dir and rh:
return rh + ':' + os.path.relpath(path, remote_dir)
return f'{rh}:{os.path.relpath(path, remote_dir)}'
return default