Skip to content

Commit

Permalink
Properly apply platform defaults when parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
mathrick committed Nov 28, 2024
1 parent 897c321 commit 4609310
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion giturlparse/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def parse(url, check_domain=True):
parsed_info.update(platform.DEFAULTS)

# Get matches as dictionary
matches = platform.clean_data(match.groupdict(default=""))
matches = platform.clean_data({k: v if v is not None else platform.DEFAULTS.get(k, "")
for k, v in match.groupdict().items()})

# Update info with matches
parsed_info.update(matches)
Expand Down

0 comments on commit 4609310

Please sign in to comment.