MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / withLazy

Method withLazy

github/Requester.py:591–605  ·  view source on GitHub ↗

Create a new requester instance with identical configuration but the given lazy setting. :param lazy: if True, completable objects created from this instance are lazy, as well as completable objects created from those, and so on. :return: new Requester instance

(self, lazy: Opt[bool])

Source from the content-addressed store, hash-verified

589 return not self.__lazy
590
591 def withLazy(self, lazy: Opt[bool]) -> Requester:
592 """
593 Create a new requester instance with identical configuration but the given lazy setting.
594
595 :param lazy: if True, completable objects created from this instance are lazy, as well as completable objects
596 created from those, and so on.
597 :return: new Requester instance if is_defined(lazy) and lazy != self.is_lazy, this instance otherwise
598
599 """
600 if is_undefined(lazy) or self.is_lazy == lazy:
601 return self
602
603 kwargs = self.kwargs
604 kwargs.update(lazy=lazy)
605 return Requester(**kwargs)
606
607 def requestJsonAndCheck(
608 self,

Callers

nothing calls this directly

Calls 3

is_undefinedFunction · 0.90
RequesterClass · 0.70
updateMethod · 0.45

Tested by

no test coverage detected