X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/9ce100ba61b6738298d86818a3d0eee7b18bfed7..6d32ab02c535c3d41495f62288c9c3fc57e9a9bb:/src/black/__init__.py diff --git a/src/black/__init__.py b/src/black/__init__.py index 75321c3..8872102 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -1308,6 +1308,18 @@ def get_features_used( # noqa: C901 ): features.add(Feature.EXCEPT_STAR) + elif n.type in {syms.subscriptlist, syms.trailer} and any( + child.type == syms.star_expr for child in n.children + ): + features.add(Feature.VARIADIC_GENERICS) + + elif ( + n.type == syms.tname_star + and len(n.children) == 3 + and n.children[2].type == syms.star_expr + ): + features.add(Feature.VARIADIC_GENERICS) + return features