add annotation_parens
This commit is contained in:
parent
23840a5331
commit
c5fc62d371
@ -200,9 +200,6 @@ def visit_dictsetmaker(self, node: Node) -> Iterator[Line]:
|
|||||||
|
|
||||||
def visit_funcdef(self, node: Node) -> Iterator[Line]:
|
def visit_funcdef(self, node: Node) -> Iterator[Line]:
|
||||||
"""Visit function definition."""
|
"""Visit function definition."""
|
||||||
if Preview.annotation_parens not in self.mode:
|
|
||||||
yield from self.visit_stmt(node, keywords={"def"}, parens=set())
|
|
||||||
else:
|
|
||||||
yield from self.line()
|
yield from self.line()
|
||||||
|
|
||||||
# Remove redundant brackets around return type annotation.
|
# Remove redundant brackets around return type annotation.
|
||||||
|
@ -149,7 +149,6 @@ def supports_feature(target_versions: Set[TargetVersion], feature: Feature) -> b
|
|||||||
class Preview(Enum):
|
class Preview(Enum):
|
||||||
"""Individual preview style features."""
|
"""Individual preview style features."""
|
||||||
|
|
||||||
annotation_parens = auto()
|
|
||||||
prefer_splitting_right_hand_side_of_assignments = auto()
|
prefer_splitting_right_hand_side_of_assignments = auto()
|
||||||
# NOTE: string_processing requires wrap_long_dict_values_in_parens
|
# NOTE: string_processing requires wrap_long_dict_values_in_parens
|
||||||
# for https://github.com/psf/black/issues/3117 to be fixed.
|
# for https://github.com/psf/black/issues/3117 to be fixed.
|
||||||
|
Loading…
Reference in New Issue
Block a user