Serialize this object so it can be saved and restored.
(self)
| 185 | return Argument(Var(name, init_type), init_type, None, arg_kind) |
| 186 | |
| 187 | def serialize(self) -> JsonDict: |
| 188 | """Serialize this object so it can be saved and restored.""" |
| 189 | return { |
| 190 | "name": self.name, |
| 191 | "alias": self.alias, |
| 192 | "has_default": self.has_default, |
| 193 | "init": self.init, |
| 194 | "kw_only": self.kw_only, |
| 195 | "has_converter": self.converter is not None, |
| 196 | "converter_init_type": ( |
| 197 | self.converter.init_type.serialize() |
| 198 | if self.converter and self.converter.init_type |
| 199 | else None |
| 200 | ), |
| 201 | "context_line": self.context.line, |
| 202 | "context_column": self.context.column, |
| 203 | "init_type": self.init_type.serialize() if self.init_type else None, |
| 204 | } |
| 205 | |
| 206 | @classmethod |
| 207 | def deserialize( |
no outgoing calls
no test coverage detected