JBKahn / flake8-debugger

flake8 debug statement checker
MIT License
41 stars 10 forks source link

Detect __import__ debugger statements #11

Closed sliverc closed 6 years ago

sliverc commented 6 years ago

Flake8 Debugger stumbles upon following statement with an exception:

__import__('ipdb').set_trace()

I first encountered this issue with an update of popular vim-snippets. Once this statement is in the code whole flake8 process won't run as it stops with an exception.

This PR fixes the issue that no exception is raised and the debugger statement is correctly detected.