Skip to content

Commit

Permalink
fix from review.
Browse files Browse the repository at this point in the history
  • Loading branch information
bagerard committed May 21, 2021
1 parent 6893743 commit 77c34db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions flake8_eradicate.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-

import ast
import tokenize
from typing import Iterable, Tuple

Expand All @@ -25,7 +25,15 @@ class Checker(object):

options = None

def __init__(self, tree, filename: str): # noqa: D107
def __init__(self, tree: ast.AST, filename: str):
"""
``flake8`` plugin constructor.
Arguments:
tree: the file abstract syntax tree.
filename: the name of the file to process
"""
self.filename = filename

self._options = {
Expand Down
4 changes: 2 additions & 2 deletions tests/test_comments.py
Expand Up @@ -136,12 +136,12 @@ def test_lines_with_commented_out_code_incorrect_fixture_output(absolute_path):

OptionsStub = namedtuple(
'Options',
'eradicate_aggressive eradicate_whitelist eradicate_whitelist_extend'
'eradicate_aggressive eradicate_whitelist eradicate_whitelist_extend',
)
Checker.options = OptionsStub(
eradicate_aggressive=True,
eradicate_whitelist=False,
eradicate_whitelist_extend=False
eradicate_whitelist_extend=False,
)

checker = Checker(tree=None, filename=filename)
Expand Down

0 comments on commit 77c34db

Please sign in to comment.