GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: require kwargs for `utils.copy_dict()` · python-gitlab/python-gitlab@7cf35b2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • gitlab
    • client.py
    • utils.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎gitlab/client.py‎

Copy file name to clipboardExpand all lines: gitlab/client.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ def http_request(
647647
url = self._build_url(path)
648648

649649
params: Dict[str, Any] = {}
650-
utils.copy_dict(params, query_data)
650+
utils.copy_dict(src=query_data, dest=params)
651651

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

666666
opts = self._get_session_opts()
667667

Collapse file

‎gitlab/utils.py‎

Copy file name to clipboardExpand all lines: gitlab/utils.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ def response_content(
4444
return None
4545

4646

47-
def copy_dict(dest: Dict[str, Any], src: Dict[str, Any]) -> None:
47+
def copy_dict(
48+
*,
49+
src: Dict[str, Any],
50+
dest: Dict[str, Any],
51+
) -> None:
4852
for k, v in src.items():
4953
if isinstance(v, dict):
5054
# Transform dict values to new attributes. For example:

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.