MCPcopy Create free account
hub / github.com/python-hyper/uritemplate / __init__

Method __init__

uritemplate/variable.py:207–221  ·  view source on GitHub ↗
(self, var: str)

Source from the content-addressed store, hash-verified

205 """
206
207 def __init__(self, var: str):
208 #: The original string that comes through with the variable
209 self.original: str = var
210 #: The operator for the variable
211 self.operator: Operator = Operator.default
212 #: List of variables in this variable
213 self.variables: t.List[t.Tuple[str, t.MutableMapping[str, t.Any]]] = (
214 []
215 )
216 #: List of variable names
217 self.variable_names: t.List[str] = []
218 #: List of defaults passed in
219 self.defaults: t.MutableMapping[str, ScalarVariableValue] = {}
220 # Parse the variable itself.
221 self.parse()
222
223 def __repr__(self) -> str:
224 return "URIVariable(%s)" % self

Callers

nothing calls this directly

Calls 1

parseMethod · 0.95

Tested by

no test coverage detected