diff --git a/flake8_debugger.py b/flake8_debugger.py index b0a08d8..1998cda 100644 --- a/flake8_debugger.py +++ b/flake8_debugger.py @@ -1,16 +1,18 @@ import pep8 import re -__version__ = '1.0' +__version__ = '1.1' DEBUGGER_REGEX = re.compile(r'(import i?pdb|i?pdb.set_trace())') -def check_for_debugger(line_of_code): - if pep8.noqa(line_of_code): + +def check_debug_statements(physical_line): + if pep8.noqa(physical_line): return - debug_match = DEBUGGER_REGEX.search(line_of_code) - if debug_match: - return debug_match.start(), 'T000 pdb/ipdb found.' + match = DEBUGGER_REGEX.search(physical_line) + if match: + return match.start(), 'T000 pdb/ipdb found.' + -check_for_debugger.name = name = 'flake8-debugger' -check_for_debugger.version = __version__ +check_debug_statements.name = name = 'flake8-debugger' +check_debug_statements.version = __version__ diff --git a/setup.py b/setup.py index a89cf00..caee410 100644 --- a/setup.py +++ b/setup.py @@ -22,9 +22,9 @@ def get_long_description(): setup( name='flake8-debugger', version=get_version(), - description="pdb and ipdb statement checker plugin for flake8", # noqa + description="pdb and ipdb checker plugin for flake8", long_description=get_long_description(), - keywords='flake8 debugger ipdb pdb', + keywords='flake8 debigger ipdb pdb', author='Joseph Kahn', author_email='josephbkahn@gmail.com', url='https://github.com/jbkahn/flake8-debugger', @@ -33,7 +33,7 @@ def get_long_description(): zip_safe=False, entry_points={ 'flake8.extension': [ - 'flake8_debugger = flake8_debugger:check_for_debugger', + 'flake8_debugger = flake8_debugger:check_debug_statements', ], }, classifiers=[