forked from pylint-dev/pylint
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a checker for calls to ``breakpoint()`` or ``sys.breakpointhook()``. This closes pylint-dev#3692
- Loading branch information
1 parent
c00b07b
commit db7a9b0
Showing
6 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# pylint: disable=missing-docstring | ||
|
||
import sys | ||
|
||
breakpoint() # [no-breakpoint] | ||
sys.breakpointhook() # [no-breakpoint] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[testoptions] | ||
min_pyver=3.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
no-breakpoint:5:0::"Leaving breakpoint() or sys.breakpointhook() in production code is unrecommended" | ||
no-breakpoint:6:0::"Leaving breakpoint() or sys.breakpointhook() in production code is unrecommended" |