Skip to content

Commit bfe3933

Browse files
[mccabe] Cover the behavior when the message is not raised
1 parent 96ee439 commit bfe3933

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""The other functional file has a max-complexity so low that it doesn't cover the
2+
case when the code is not too complex."""
3+
4+
5+
def not_too_complex():
6+
"""McCabe rating: 1"""
7+
return True
8+
9+
10+
def too_complex(condition): # [too-complex]
11+
"""McCabe rating: 2"""
12+
if condition is True:
13+
return True
14+
return False
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[MAIN]
2+
load-plugins=pylint.extensions.mccabe,
3+
4+
max-complexity=1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
too-complex:10:0:10:15:too_complex:'too_complex' is too complex. The McCabe rating is 2:HIGH

0 commit comments

Comments
 (0)