Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions 6 gitlab/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ def http_request(
url = self._build_url(path)

params: Dict[str, Any] = {}
utils.copy_dict(params, query_data)
utils.copy_dict(src=query_data, dest=params)

# Deal with kwargs: by default a user uses kwargs to send data to the
# gitlab server, but this generates problems (python keyword conflicts
Expand All @@ -656,12 +656,12 @@ def http_request(
# value as arguments for the gitlab server, and ignore the other
# arguments, except pagination ones (per_page and page)
if "query_parameters" in kwargs:
utils.copy_dict(params, kwargs["query_parameters"])
utils.copy_dict(src=kwargs["query_parameters"], dest=params)
for arg in ("per_page", "page"):
if arg in kwargs:
params[arg] = kwargs[arg]
else:
utils.copy_dict(params, kwargs)
utils.copy_dict(src=kwargs, dest=params)

opts = self._get_session_opts()

Expand Down
6 changes: 5 additions & 1 deletion 6 gitlab/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ def response_content(
return None


def copy_dict(dest: Dict[str, Any], src: Dict[str, Any]) -> None:
def copy_dict(
*,
src: Dict[str, Any],
dest: Dict[str, Any],
) -> None:
for k, v in src.items():
if isinstance(v, dict):
# Transform dict values to new attributes. For example:
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.