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

Method create_subscript

scripts/openapi.py:395–400  ·  view source on GitHub ↗
(cls, name: str)

Source from the content-addressed store, hash-verified

393
394 @classmethod
395 def create_subscript(cls, name: str) -> cst.Subscript:
396 fields = name.rstrip("]").split("[", maxsplit=1)
397 name = fields[0]
398 index = fields[1]
399 sub = cst.Subscript(cst.Name(name), [cst.SubscriptElement(cst.Index(cst.Integer(index)))])
400 return sub
401
402 @classmethod
403 def create_attribute(cls, names: list[str]) -> cst.BaseExpression:

Callers 1

create_attributeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected