mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-10 21:34:18 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
5ed90ea4af
commit
db3b44e4ec
2 changed files with 3 additions and 3 deletions
|
|
@ -48,7 +48,7 @@ class DebugStatementParser(ast.NodeVisitor):
|
||||||
if isinstance(node.args[0], ast.Constant) and node.args[0].value in DEBUG_STATEMENTS:
|
if isinstance(node.args[0], ast.Constant) and node.args[0].value in DEBUG_STATEMENTS:
|
||||||
st = Debug(node.lineno, node.col_offset, node.args[0].value, 'imported')
|
st = Debug(node.lineno, node.col_offset, node.args[0].value, 'imported')
|
||||||
self.breakpoints.append(st)
|
self.breakpoints.append(st)
|
||||||
|
|
||||||
"""python3.7+ breakpoint()"""
|
"""python3.7+ breakpoint()"""
|
||||||
if isinstance(node.func, ast.Name) and node.func.id == 'breakpoint':
|
if isinstance(node.func, ast.Name) and node.func.id == 'breakpoint':
|
||||||
st = Debug(node.lineno, node.col_offset, node.func.id, 'called')
|
st = Debug(node.lineno, node.col_offset, node.func.id, 'called')
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@ def test_finds_debug_import_from_import():
|
||||||
'q',
|
'q',
|
||||||
'rdb',
|
'rdb',
|
||||||
'rpdb',
|
'rpdb',
|
||||||
'wdb'
|
'wdb',
|
||||||
)
|
),
|
||||||
)
|
)
|
||||||
def test_finds_debug_import_when_using_dunder_import(debugger_module):
|
def test_finds_debug_import_when_using_dunder_import(debugger_module):
|
||||||
visitor = DebugStatementParser()
|
visitor = DebugStatementParser()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue