Skip to content

Commit 7533533

Browse files
elazarggvanrossum
authored andcommitted
Remove unused serialization code. Fix typo. (#2274)
1 parent 41f42bd commit 7533533

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

mypy/nodes.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ class Argument(Node):
365365

366366
variable = None # type: Var
367367
type_annotation = None # type: Optional[mypy.types.Type]
368-
initializater = None # type: Optional[Expression]
368+
initializer = None # type: Optional[Expression]
369369
kind = None # type: int
370370
initialization_statement = None # type: Optional[AssignmentStmt]
371371

@@ -406,24 +406,6 @@ def set_line(self, target: Union[Token, Node, int], column: int = None) -> None:
406406
self.initialization_statement.set_line(self.line, self.column)
407407
self.initialization_statement.lvalues[0].set_line(self.line, self.column)
408408

409-
def serialize(self) -> JsonDict:
410-
# Note: we are deliberately not saving the type annotation since
411-
# it is not used by later stages of mypy.
412-
data = {'.class': 'Argument',
413-
'kind': self.kind,
414-
'variable': self.variable.serialize(),
415-
} # type: JsonDict
416-
# TODO: initializer?
417-
return data
418-
419-
@classmethod
420-
def deserialize(cls, data: JsonDict) -> 'Argument':
421-
assert data['.class'] == 'Argument'
422-
return Argument(Var.deserialize(data['variable']),
423-
None,
424-
None, # TODO: initializer?
425-
kind=data['kind'])
426-
427409

428410
class FuncItem(FuncBase):
429411
arguments = [] # type: List[Argument]

0 commit comments

Comments
 (0)