annotation_parens
This commit is contained in:
parent
00cd37169d
commit
b6cd780453
@ -181,9 +181,6 @@ def visit_stmt(
|
|||||||
|
|
||||||
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()
|
|
||||||
empty_lines_before_class_or_def_with_leading_comments = auto()
|
empty_lines_before_class_or_def_with_leading_comments = auto()
|
||||||
handle_trailing_commas_in_head = auto()
|
handle_trailing_commas_in_head = auto()
|
||||||
long_docstring_quotes_on_newline = auto()
|
long_docstring_quotes_on_newline = auto()
|
||||||
|
Loading…
Reference in New Issue
Block a user