(self: FuncDef)
| 156 | |
| 157 | |
| 158 | def convert_func_def(self: FuncDef) -> Json: |
| 159 | return { |
| 160 | ".class": "FuncDef", |
| 161 | "name": self._name, |
| 162 | "fullname": self._fullname, |
| 163 | "arg_names": self.arg_names, |
| 164 | "arg_kinds": [int(x.value) for x in self.arg_kinds], |
| 165 | "type": None if self.type is None else convert_type(self.type), |
| 166 | "flags": get_flags(self, FUNCDEF_FLAGS), |
| 167 | "abstract_status": self.abstract_status, |
| 168 | # TODO: Do we need expanded, original_def? |
| 169 | "dataclass_transform_spec": ( |
| 170 | None |
| 171 | if self.dataclass_transform_spec is None |
| 172 | else convert_dataclass_transform_spec(self.dataclass_transform_spec) |
| 173 | ), |
| 174 | "deprecated": self.deprecated, |
| 175 | "original_first_arg": self.original_first_arg, |
| 176 | } |
| 177 | |
| 178 | |
| 179 | def convert_dataclass_transform_spec(self: DataclassTransformSpec) -> Json: |
no test coverage detected
searching dependent graphs…