-
Notifications
You must be signed in to change notification settings - Fork 675
chore: add a lazy boolean attribute to RESTObject
#2082
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
Conversation
671d02d to
7ed5620
Compare
Codecov Report
@@ Coverage Diff @@
## main #2082 +/- ##
=======================================
Coverage 95.39% 95.39%
=======================================
Files 79 79
Lines 5149 5152 +3
=======================================
+ Hits 4912 4915 +3
Misses 237 237
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
@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. |
7ed5620 to
8ba00fc
Compare
Good idea. I added a real-world use case at the same time. |
7c668e0 to
7b4ecea
Compare
7b4ecea to
8d8f296
Compare
|
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 :) |
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`.
8d8f296 to
a7e8cfb
Compare
This can be used to tell if a
RESTObjectwas created usinglazy=True.Add a message to the
AttributeErrorif attribute access fails for aninstance created with
lazy=True.