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

Method create_attribute

scripts/openapi.py:403–410  ·  view source on GitHub ↗
(cls, names: list[str])

Source from the content-addressed store, hash-verified

401
402 @classmethod
403 def create_attribute(cls, names: list[str]) -> cst.BaseExpression:
404 names = [cls.create_subscript(name) if "[" in name and name.endswith("]") else cst.Name(name) for name in names]
405 if len(names) == 1:
406 return names[0]
407 attr = cst.Attribute(names[0], names[1])
408 for name in names[2:]:
409 attr = cst.Attribute(attr, name)
410 return attr
411
412 @classmethod
413 def create_type(

Callers 9

create_typeMethod · 0.80
leave_ModuleMethod · 0.80
create_init_attrMethod · 0.80
make_attributeMethod · 0.80
create_use_attrMethod · 0.80
get_valueMethod · 0.80
create_statementMethod · 0.80
create_methodMethod · 0.80

Calls 1

create_subscriptMethod · 0.80

Tested by

no test coverage detected