diff options
author | John L. Villalovos <john@sodarock.com> | 2022-01-08 13:58:04 -0800 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2022-01-08 13:58:04 -0800 |
commit | 8c17afafcc7d9d2a8fecb53b853c2b4f004c4121 (patch) | |
tree | 10193bc1178dab265df9cd8fa31cff278e6ad909 /gitlab/utils.py | |
parent | d45b59e800a14460a1ecdad2d750e42aa99bb96e (diff) | |
download | gitlab-jlvillal/remove_replace.tar.gz |
chore: remove custom URL encodingjlvillal/remove_replace
We were using `str.replace()` calls to take care of URL encoding
issues.
Switch them to use our `utils.clean_str_id` which itself uses
`urllib.parse.quote()`
Closes: #1356
Diffstat (limited to 'gitlab/utils.py')
-rw-r--r-- | gitlab/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gitlab/utils.py b/gitlab/utils.py index a1dcb45..2ae107c 100644 --- a/gitlab/utils.py +++ b/gitlab/utils.py @@ -16,7 +16,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. from typing import Any, Callable, Dict, Optional -from urllib.parse import quote +import urllib.parse import requests @@ -57,7 +57,7 @@ def copy_dict(dest: Dict[str, Any], src: Dict[str, Any]) -> None: def clean_str_id(id: str) -> str: - return quote(id, safe="") + return urllib.parse.quote(id, safe="") def remove_none_from_dict(data: Dict[str, Any]) -> Dict[str, Any]: |