MCPcopy Index your code
hub / github.com/python/mypy / convert_var

Function convert_var

mypy/exportjson.py:218–229  ·  view source on GitHub ↗
(self: Var)

Source from the content-addressed store, hash-verified

216
217
218def convert_var(self: Var) -> Json:
219 data: dict[str, Any] = {
220 ".class": "Var",
221 "name": self._name,
222 "fullname": self._fullname,
223 "type": None if self.type is None else convert_type(self.type),
224 "setter_type": None if self.setter_type is None else convert_type(self.setter_type),
225 "flags": get_flags(self, VAR_FLAGS),
226 }
227 if self.final_value is not None:
228 data["final_value"] = self.final_value
229 return data
230
231
232def convert_type_info(self: TypeInfo, cfg: Config) -> Json:

Callers 2

convert_symbol_nodeFunction · 0.85
convert_decoratorFunction · 0.85

Calls 2

get_flagsFunction · 0.90
convert_typeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…