FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore: require kwargs for `utils.copy_dict()` by JohnVillalovos · Pull Request #1871 · python-gitlab/python-gitlab · GitHub

Repository navigation

chore: require kwargs for utils.copy_dict() - #1871

Merged
nejch merged 1 commit into
mainfrom
jlvillal/copy_dict
Feb 3, 2022
Merged

nejch merged 1 commit into
mainfrom
jlvillal/copy_dict

Conversation

JohnVillalovos commented Feb 2, 2022 •
edited
Loading

Copy link
Copy Markdown
Member

The non-keyword arguments were a tiny bit confusing as the destination was
first and the source was second.

Change the order and require key-word only arguments to ensure we
don't silently break anyone.

codecov-commenter commented Feb 2, 2022 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #1871 (7cf35b2) into main (64d01ef) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1871   +/-   ##
=======================================
  Coverage   92.51%   92.51%           
=======================================
  Files          78       78           
  Lines        4878     4878           
=======================================
  Hits         4513     4513           
  Misses        365      365           
Flag Coverage Δ
cli_func_v4 81.59% <75.00%> (ø)
py_func_v4 80.42% <100.00%> (ø)
unit 83.37% <75.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gitlab/client.py 90.55% <100.00%> (ø)
gitlab/utils.py 87.09% <100.00%> (ø)

nejch commented Feb 3, 2022

Copy link
Copy Markdown
Member

Non-keyword arguments are a tiny bit confusing as the destination is first and the source is second.

Should we switch them everywhere? If someone uses this undocumented function outside the library I would be slightly confused :D

Copy link
Copy Markdown
Member Author

Non-keyword arguments are a tiny bit confusing as the destination is first and the source is second.

Should we switch them everywhere? If someone uses this undocumented function outside the library I would be slightly confused :D

Sorry I don't understand? Switch what everywhere?

Maybe my description should have been:

The non-keyword argument order in utils.copy_dict() is confusing as the destination is first and the source is second.

nejch commented Feb 3, 2022

Copy link
Copy Markdown
Member

I understand, but since we're already making a breaking change by introducing required keyword arguments, we can also switch them to be src first, dest, second - both in the definition and when they're called. Would that make sense?

Copy link
Copy Markdown
Member Author

I guess I don't think of it as a breaking change. But maybe that means we need to define what is considered a breaking change.

What part of the API do we consider covered for it be a breaking change? We probably need to document that. I don't think an internal utility library function is part of our API.

nejch commented Feb 3, 2022

Copy link
Copy Markdown
Member

I guess I don't think of it as a breaking change. But maybe that means we need to define what is considered a breaking change.

What part of the API do we consider covered for it be a breaking change? We probably need to document that. I don't think an internal utility library function is part of our API.

Sorry, I wasn't super clear there, I didn't mean something user-facing or to add to the changelog, just that the way the function can be used now has changed. So if we're already doing that, we can also correct the order and switch the args :)

Copy link
Copy Markdown
Member Author

Sorry, I wasn't super clear there, I didn't mean something user-facing or to add to the changelog, just that the way the function can be used now has changed. So if we're already doing that, we can also correct the order and switch the args :)

Ah! That makes total sense to me 👍

The non-keyword arguments were a tiny bit confusing as the destination was
first and the source was second.

Change the order and require key-word only arguments to ensure we
don't silently break anyone.
nejch merged commit 2adf31d into main Feb 3, 2022
nejch deleted the jlvillal/copy_dict branch February 3, 2022 22:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL