mirror of
https://github.com/davidhalter/parso.git
synced 2026-05-11 09:08:40 +08:00
Small refactoring.
This commit is contained in:
@@ -108,8 +108,7 @@ class ImplicitNode(BracketNode):
|
|||||||
Implicit indentation after keyword arguments, default arguments,
|
Implicit indentation after keyword arguments, default arguments,
|
||||||
annotations and dict values.
|
annotations and dict values.
|
||||||
"""
|
"""
|
||||||
def __init__(self, config, parent_indentation, leaf, parent):
|
def __init__(self, config, leaf, parent):
|
||||||
# TODO remove parent_indentation?
|
|
||||||
super(ImplicitNode, self).__init__(config, leaf, parent)
|
super(ImplicitNode, self).__init__(config, leaf, parent)
|
||||||
self.type = IndentationTypes.IMPLICIT
|
self.type = IndentationTypes.IMPLICIT
|
||||||
|
|
||||||
@@ -497,8 +496,7 @@ class PEP8Normalizer(Normalizer):
|
|||||||
and part.parent.type in _IMPLICIT_INDENTATION_TYPES:
|
and part.parent.type in _IMPLICIT_INDENTATION_TYPES:
|
||||||
indentation = node.indentation
|
indentation = node.indentation
|
||||||
self._indentation_tos = ImplicitNode(
|
self._indentation_tos = ImplicitNode(
|
||||||
self._config, indentation, part,
|
self._config, part, parent=self._indentation_tos
|
||||||
parent=self._indentation_tos
|
|
||||||
)
|
)
|
||||||
|
|
||||||
self._on_newline = type_ in ('newline', 'backslash')
|
self._on_newline = type_ in ('newline', 'backslash')
|
||||||
|
|||||||
Reference in New Issue
Block a user