X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/f10ce0c942b41cd4c6802ba690a432c6adedc05e..dc90d4951f66ac665582159537b902017d9a0361:/src/black/__init__.py diff --git a/src/black/__init__.py b/src/black/__init__.py index f2efdec..08c239d 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -1210,6 +1210,14 @@ def get_features_used( # noqa: C901 if argch.type in STARS: features.add(feature) + elif ( + n.type in {syms.return_stmt, syms.yield_expr} + and len(n.children) >= 2 + and n.children[1].type == syms.testlist_star_expr + and any(child.type == syms.star_expr for child in n.children[1].children) + ): + features.add(Feature.UNPACKING_ON_FLOW) + # Python 2 only features (for its deprecation) except for integers, see above elif n.type == syms.print_stmt: features.add(Feature.PRINT_STMT)