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

Method get__repr__

github/GithubObject.py:482–499  ·  view source on GitHub ↗

Converts the object to a nicely printable string.

(self, params: dict[str, Any])

Source from the content-addressed store, hash-verified

480 return self._makeHttpDatetimeAttribute(self.last_modified).value # type: ignore
481
482 def get__repr__(self, params: dict[str, Any]) -> str:
483 """
484 Converts the object to a nicely printable string.
485 """
486
487 def format_params(params: dict[str, Any]) -> typing.Generator[str, None, None]:
488 items = list(params.items())
489 for k, v in sorted(items, key=itemgetter(0), reverse=True):
490 if isinstance(v, bytes):
491 v = v.decode("utf-8")
492 if isinstance(v, str):
493 v = f'"{v}"'
494 yield f"{k}={v}"
495
496 return "{class_name}({params})".format(
497 class_name=self.__class__.__name__,
498 params=", ".join(list(format_params(params))),
499 )
500
501 def _initAttributes(self) -> None:
502 raise NotImplementedError("BUG: Not Implemented _initAttributes")

Callers 15

__repr__Method · 0.80
__repr__Method · 0.80
__repr__Method · 0.80
__repr__Method · 0.80
__repr__Method · 0.80
__repr__Method · 0.80
__repr__Method · 0.80
__repr__Method · 0.80
__repr__Method · 0.80
__repr__Method · 0.80
__repr__Method · 0.80
__repr__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected