-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
As I'm already familiar with lazy objects & workflows, I would like it to have lazy==True to be the default. But because this may be not the best for everyone, I propose adding a default lazy argument to the initial Github class constructor which becomes the default for every method called by it. If I gain some time, I will look into implementing it myself. However if someone else is faster to implement it, feel free to implement & submit it yourself.
This may be implemented by adding a variable to Github which holds the global default, can be set by using the constructor and defaults to False (to keep the current behavior the default). Then every method supporting lazy behavior may either look up this global default by itself or a decorator is implemented which replaces the lazy parameter by itself. The default for the method's argument should be set to None. Then the following comparison code can be used to resolve the value to use:
lazy_global_default if lazy_method_arg is None else lazy_method_arg(This issue serves as a reminder for myself.)
PS: This library looks really good & is easy to use, thanks for the work.