]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

delete some dead code (#669)
authorAnthony Sottile <asottile@umich.edu>
Sat, 12 Jan 2019 17:23:20 +0000 (09:23 -0800)
committerJelle Zijlstra <jelle.zijlstra@gmail.com>
Sat, 12 Jan 2019 17:23:20 +0000 (09:23 -0800)
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) '
```

black.py

index fb8e474931a7319581603b71becde15dc018665b..57d5c8377a6a7357fdbb44cca369f6c3ba51b19e 100644 (file)
--- 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,