Reputation: 53
Example:
def exmaple_function():
a = 1
b = 2
c = 3
d = a * b + c
print(d)
As you can see above function constitutes of 6 lines from start of (def) to end of (print(d)).
Is there a way to set limit in Pylint Config-file of the lines used inside python function? example: max-lines-of-function=4 using Pylint with configuration file.
Upvotes: 2
Views: 1717
Reputation: 4282
This is the too-many-statements
warnings, the default value is 50 but you can change it to something else with a pylintrc configuration:
[DESIGN]
# Maximum number of statements in function / method body
max-statements=50
Upvotes: 2