From: Anthony Sottile Date: Sat, 12 Jan 2019 17:23:20 +0000 (-0800) Subject: delete some dead code (#669) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/7546ed292c32ce6b86d0b5b2396131fa42f10645?ds=inline delete some dead code (#669) dead code detected via [dead](https://github.com/asottile/dead) - **`KEYWORDS`**: introduced (unreferenced) in e74117f172e29e8a980e2c9de929ad50d3769150 - **`FLOW_CONTROL`**: last referenced in e9a940d69e789ce8caf1f3c1ded786dc102df2fd "clean" command: ``` dead --exclude '^(tests/data/|docs/conf.py|blib2to3/)' | grep -Ev '^(visit_.*|show|_stop_signal|lib2to3_unparse) ' ``` --- diff --git a/black.py b/black.py index fb8e474..57d5c83 100644 --- a/black.py +++ b/black.py @@ -6,7 +6,6 @@ from enum import Enum, Flag from functools import lru_cache, partial, wraps import io import itertools -import keyword import logging from multiprocessing import Manager, freeze_support import os @@ -777,9 +776,7 @@ class DebugVisitor(Visitor[T]): list(v.visit(code)) -KEYWORDS = set(keyword.kwlist) WHITESPACE = {token.DEDENT, token.INDENT, token.NEWLINE} -FLOW_CONTROL = {"return", "raise", "break", "continue"} STATEMENT = { syms.if_stmt, syms.while_stmt,