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

Function translate

github/GithubObject.py:182–191  ·  view source on GitHub ↗
(attr: str)

Source from the content-addressed store, hash-verified

180 }
181
182 def translate(attr: str) -> str:
183 def un_capitalize(match: re.Match) -> str:
184 return match.group(1) + match.group(2).lower()
185
186 attr = attribute_translation.get(attr, attr)
187 attr = re.sub(r"([A-Z])([A-Z]+)", un_capitalize, attr)
188 attr = camel_to_snake_case_regexp.sub("_", attr)
189 attr = attr.lower()
190
191 return attr
192
193 return {
194 translate(k): as_rest_api_attributes(v)

Callers 1

as_rest_api_attributesFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…