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

chore: add a `lazy` boolean attribute to `RESTObject` by JohnVillalovos · Pull Request #2082 · python-gitlab/python-gitlab · GitHub

Repository navigation

chore: add a lazy boolean attribute to RESTObject - #2082

Merged
nejch merged 1 commit into
mainfrom
jlvillal/mark_lazy_state
Jul 20, 2022
Merged

nejch merged 1 commit into
mainfrom
jlvillal/mark_lazy_state

Conversation

JohnVillalovos commented Jun 20, 2022 •
edited
Loading

Copy link
Copy Markdown
Member

This can be used to tell if a RESTObject was created using
lazy=True.

Add a message to the AttributeError if attribute access fails for an
instance created with lazy=True.

JohnVillalovos requested a review from nejch June 20, 2022 18:54
JohnVillalovos force-pushed the jlvillal/mark_lazy_state branch from 671d02d to 7ed5620 Compare June 20, 2022 19:03

codecov-commenter commented Jun 20, 2022 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #2082 (8d8f296) into main (e772248) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2082   +/-   ##
=======================================
  Coverage   95.39%   95.39%           
=======================================
  Files          79       79           
  Lines        5149     5152    +3     
=======================================
+ Hits         4912     4915    +3     
  Misses        237      237           
Flag Coverage Δ
cli_func_v4 82.58% <80.00%> (-0.01%) ⬇️
py_func_v4 81.07% <60.00%> (-0.03%) ⬇️
unit 87.01% <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 100.00% <100.00%> (ø)
gitlab/mixins.py 92.30% <100.00%> (ø)

nejch commented Jun 21, 2022

Copy link
Copy Markdown
Member

@JohnVillalovos I don't mind this but I think it would be good to merge with a real-world use case implemented along with it, as currently this does not do anything. WDYT?

Comment thread gitlab/mixins.py

Copy link
Copy Markdown
Member Author

@JohnVillalovos I don't mind this but I think it would be good to merge with a real-world use case implemented along with it, as currently this does not do anything. WDYT?

Sure. Will update it either today or tomorrow.

JohnVillalovos marked this pull request as draft June 21, 2022 15:49
JohnVillalovos force-pushed the jlvillal/mark_lazy_state branch from 7ed5620 to 8ba00fc Compare July 6, 2022 05:28

Copy link
Copy Markdown
Member Author

@JohnVillalovos I don't mind this but I think it would be good to merge with a real-world use case implemented along with it, as currently this does not do anything. WDYT?

Good idea. I added a real-world use case at the same time.

JohnVillalovos marked this pull request as ready for review July 6, 2022 05:30
JohnVillalovos requested a review from nejch July 6, 2022 05:30
JohnVillalovos force-pushed the jlvillal/mark_lazy_state branch 2 times, most recently from 7c668e0 to 7b4ecea Compare July 12, 2022 15:08
JohnVillalovos force-pushed the jlvillal/mark_lazy_state branch from 7b4ecea to 8d8f296 Compare July 18, 2022 05:25

nejch commented Jul 20, 2022

Copy link
Copy Markdown
Member

Thanks @JohnVillalovos, just one more comment on the warning message, as I think it might be confusing if it raises for a real error on a method typo or so :)

Comment thread tests/unit/mixins/test_mixin_methods.py Outdated
Comment thread tests/unit/mixins/test_mixin_methods.py Outdated
Comment thread gitlab/base.py Outdated
This can be used to tell if a `RESTObject` was created using
`lazy=True`.

Add a message to the `AttributeError` if attribute access fails for an
instance created with `lazy=True`.
JohnVillalovos force-pushed the jlvillal/mark_lazy_state branch from 8d8f296 to a7e8cfb Compare July 20, 2022 15:35
nejch merged commit 2c90fd0 into main Jul 20, 2022
nejch deleted the jlvillal/mark_lazy_state branch July 20, 2022 19:17
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