From: James Addison Date: Thu, 4 Feb 2021 18:07:43 +0000 (+0000) Subject: Cleanup: remove unused / redundant variables from conditionals X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/24700806f681f2809a2b85999871e291c36dd948?hp=e0d766727dc87f5c5f39ef751d0bf23fc5ff31a0 Cleanup: remove unused / redundant variables from conditionals --- diff --git a/src/black/__init__.py b/src/black/__init__.py index 3eea33c..c2a4bda 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -5971,8 +5971,7 @@ def generate_trailers_to_omit(line: Line, line_length: int) -> Iterator[Set[Leaf elif leaf.type in CLOSING_BRACKETS: prev = line.leaves[index - 1] if index > 0 else None if ( - line.magic_trailing_comma - and prev + prev and prev.type == token.COMMA and not is_one_tuple_between( leaf.opening_bracket, leaf, line.leaves @@ -5999,8 +5998,7 @@ def generate_trailers_to_omit(line: Line, line_length: int) -> Iterator[Set[Leaf yield omit if ( - line.magic_trailing_comma - and prev + prev and prev.type == token.COMMA and not is_one_tuple_between(leaf.opening_bracket, leaf, line.leaves) ): @@ -6659,7 +6657,7 @@ def can_omit_invisible_parens( # unnecessary. return True - if line.magic_trailing_comma and penultimate.type == token.COMMA: + if penultimate.type == token.COMMA: # The rightmost non-omitted bracket pair is the one we want to explode on. return True