Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: flake8-eyeo/flake8_eyeo.py

Issue 29573036: Noissue - Drop support for flake8 2 from flake8-eyeo (Closed)
Patch Set: Created Oct. 10, 2017, 8:01 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | flake8-eyeo/setup.py » ('j') | flake8-eyeo/setup.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: flake8-eyeo/flake8_eyeo.py
===================================================================
--- a/flake8-eyeo/flake8_eyeo.py
+++ b/flake8-eyeo/flake8_eyeo.py
@@ -353,16 +353,12 @@
self._visit_hash_keys(node.elts, 'item in set')
-class ASTChecker(object):
- def __init__(self, tree, filename):
- self.tree = tree
+def check_ast(tree):
Sebastian Noack 2017/10/10 20:15:32 This was merely a class because flake8 2 required
+ visitor = TreeVisitor()
+ visitor.visit(tree)
- def run(self):
- visitor = TreeVisitor()
- visitor.visit(self.tree)
-
- for node, error in visitor.errors:
- yield (node.lineno, node.col_offset, error, type(self))
+ for node, error in visitor.errors:
+ yield (node.lineno, node.col_offset, error, None)
Sebastian Noack 2017/10/10 20:15:32 The forth argument is obsolete and unused. However
def check_non_default_encoding(physical_line, line_number):
@@ -471,7 +467,7 @@
return []
-for checker in [ASTChecker, check_non_default_encoding,
+for checker in [check_ast, check_non_default_encoding,
check_quotes, check_redundant_parenthesis]:
checker.name = 'eyeo'
checker.version = __version__
« no previous file with comments | « no previous file | flake8-eyeo/setup.py » ('j') | flake8-eyeo/setup.py » ('J')

Powered by Google App Engine
This is Rietveld