Skip to content

chore: make Get.*Mixin._optional_get_attrs always present #1412

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 26, 2021
Merged

chore: make Get.*Mixin._optional_get_attrs always present #1412

merged 1 commit into from
Apr 26, 2021

Conversation

JohnVillalovos
Copy link
Member

@JohnVillalovos JohnVillalovos commented Apr 24, 2021

Always create GetMixin/GetWithoutIdMixin._optional_get_attrs attribute
with a default value of tuple()

This way we don't need to use hasattr() and we will know the type of
the attribute.

@JohnVillalovos JohnVillalovos marked this pull request as draft April 24, 2021 19:54
Always create GetMixin/GetWithoutIdMixin._optional_get_attrs attribute
with a default value of tuple()

This way we don't need to use hasattr() and we will know the type of
the attribute.
@codecov-commenter
Copy link

Codecov Report

Merging #1412 (3c1a0b3) into master (4f79dff) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1412   +/-   ##
=======================================
  Coverage   80.20%   80.21%           
=======================================
  Files          73       73           
  Lines        4067     4068    +1     
=======================================
+ Hits         3262     3263    +1     
  Misses        805      805           
Flag Coverage Δ
unit 80.21% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
gitlab/client.py 78.96% <100.00%> (-0.06%) ⬇️
gitlab/mixins.py 77.32% <100.00%> (+0.10%) ⬆️
gitlab/v4/cli.py 41.63% <100.00%> (ø)

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 cfc42d2...3c1a0b3. Read the comment docs.

@JohnVillalovos JohnVillalovos changed the title chore: make GetMixin._optional_get_attrs always present chore: make Get.*Mixin._optional_get_attrs always present Apr 24, 2021
@JohnVillalovos JohnVillalovos marked this pull request as ready for review April 24, 2021 20:03
@nejch nejch merged commit 5b81d7d into python-gitlab:master Apr 26, 2021
@JohnVillalovos JohnVillalovos deleted the jlvillal/optional_get_attrs branch January 4, 2022 06:52
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