8000 `url`: Improvements to parsing URLs by tony · Pull Request #423 · vcs-python/libvcs · GitHub
[go: up one dir, main page]

Skip to content

url: Improvements to parsing URLs #423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(url[git]): De-duplicate code in GitURL
  • Loading branch information
tony committed Sep 25, 2022
commit 5799245f727ed5736ec166de105d87da376d0590
10 changes: 1 addition & 9 deletions src/libvcs/url/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,12 +613,4 @@ def to_url(self) -> str:

:meth:`GitBaseURL.to_url`, :meth:`GitPipURL.to_url`
"""
if self.scheme is not None:
parts = [self.scheme, "://", self.hostname, "/", self.path]
else:
parts = [self.user or "git", "@", self.hostname, ":", self.path]

if self.suffix:
parts.append(self.suffix)

return "".join(part for part in parts if isinstance(part, str))
return super().to_url()
0