MCPcopy Index your code
hub / github.com/kubernetes-client/python / _name_of

Function _name_of

kubernetes/e2e_test/test_informer.py:31–34  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

29
30
31def _name_of(obj):
32 if hasattr(obj, "metadata"):
33 return obj.metadata.name
34 return (obj.get("metadata") or {}).get("name")
35
36
37class TestSharedInformerE2E(unittest.TestCase):

Calls 1

getMethod · 0.45

Tested by

no test coverage detected