Skip to content

Commit

Permalink
chore: use urlunparse instead of string replace
Browse files Browse the repository at this point in the history
Use the `urlunparse()` function to reconstruct the URL without the
query parameters.
  • Loading branch information
JohnVillalovos committed Aug 4, 2022
1 parent d263f57 commit 6d1b62d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gitlab/client.py
Expand Up @@ -685,7 +685,7 @@ def http_request(
params = parse.parse_qs(parsed.query)
utils.copy_dict(src=query_data, dest=params)

url = raw_url.replace(parsed.query, "").strip("?")
url = parse.urlunparse(parsed._replace(query=""))

# Deal with kwargs: by default a user uses kwargs to send data to the
# gitlab server, but this generates problems (python keyword conflicts
Expand Down

0 comments on commit 6d1b62d

Please sign in to comment.