Skip to content

chore: have _create_attrs & _update_attrs be a namedtuple #1366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2021
Merged

chore: have _create_attrs & _update_attrs be a namedtuple #1366

merged 1 commit into from
Apr 17, 2021

Conversation

JohnVillalovos
Copy link
Member

@JohnVillalovos JohnVillalovos commented Mar 7, 2021

Convert _create_attrs and _update_attrs to use a NamedTuple
(RequiredOptional) to help with code readability. Update all code to
use the NamedTuple.

@JohnVillalovos JohnVillalovos marked this pull request as draft March 7, 2021 19:34
@codecov-io
Copy link

codecov-io commented Mar 7, 2021

Codecov Report

Merging #1366 (a421966) into master (8603248) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1366      +/-   ##
==========================================
+ Coverage   79.92%   79.94%   +0.01%     
==========================================
  Files          73       73              
  Lines        4010     4013       +3     
==========================================
+ Hits         3205     3208       +3     
  Misses        805      805              
Flag Coverage Δ
unit 79.94% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
gitlab/base.py 85.35% <100.00%> (+0.28%) ⬆️
gitlab/mixins.py 77.41% <100.00%> (ø)
gitlab/v4/cli.py 41.63% <100.00%> (ø)
gitlab/v4/objects/appearance.py 100.00% <100.00%> (ø)
gitlab/v4/objects/applications.py 100.00% <100.00%> (ø)
gitlab/v4/objects/award_emojis.py 100.00% <100.00%> (ø)
gitlab/v4/objects/badges.py 100.00% <100.00%> (ø)
gitlab/v4/objects/boards.py 100.00% <100.00%> (ø)
gitlab/v4/objects/branches.py 73.52% <100.00%> (ø)
gitlab/v4/objects/broadcast_messages.py 100.00% <100.00%> (ø)
... and 34 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8603248...a421966. Read the comment docs.

@JohnVillalovos JohnVillalovos changed the title WIP: chore: add _create_attrs & _update_attrs to RESTManager chore: add _create_attrs & _update_attrs to RESTManager Mar 7, 2021
@JohnVillalovos JohnVillalovos changed the title chore: add _create_attrs & _update_attrs to RESTManager RFC: chore: add _create_attrs & _update_attrs to RESTManager Mar 7, 2021
@JohnVillalovos JohnVillalovos marked this pull request as ready for review March 7, 2021 22:34
@JohnVillalovos
Copy link
Member Author

Breaking this up into smaller pieces.

@JohnVillalovos JohnVillalovos changed the title RFC: chore: add _create_attrs & _update_attrs to RESTManager chore: have _create_attrs & _update_attrs be a namedtuple Mar 14, 2021
@JohnVillalovos
Copy link
Member Author

@nejch Updated this with your feedback.

Convert _create_attrs and _update_attrs to use a NamedTuple
(RequiredOptional) to help with code readability. Update all code to
use the NamedTuple.
@nejch
Copy link
Member

nejch commented Apr 17, 2021

@nejch Updated this with your feedback.

Thanks a lot for the hard work here, looks a lot clearer than the old code! Sorry for the delay, again :)
I didn't want to block this PR any longer so I just force-pushed a tiny change to delete a leftover tt.sh script, I hope that's ok. I'll merge in a minute.

@nejch nejch merged commit d1697d4 into python-gitlab:master Apr 17, 2021
@JohnVillalovos
Copy link
Member Author

@nejch Updated this with your feedback.

Thanks a lot for the hard work here, looks a lot clearer than the old code! Sorry for the delay, again :)
I didn't want to block this PR any longer so I just force-pushed a tiny change to delete a leftover tt.sh script, I hope that's ok. I'll merge in a minute.

Oh! Whoops on my part leaving the tt.sh in there 😟

Thanks for the merge!

@JohnVillalovos JohnVillalovos deleted the jlvillal/create_attrs branch April 18, 2021 17:04
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