rspec/rules/S5878/python/rule.adoc
Alban Auzeill 2c306d110e Fix code block ambiguity with old header style
Ensure blank line before list and clean the one leading space
2020-06-30 17:16:12 +02:00

27 lines
536 B
Plaintext

include::../description.adoc[]
== Noncompliant Code Example
With a maximum number of 4 parameters:
----
def do_something(param1, param2, param3, param4, param5): # Noncompliant
...
----
== Compliant Solution
----
def do_something(param1, param2, param3, param4):
...
# Or
def do_something(param1, param2, param3, param4, param5="a default value"):
...
----
== Exceptions
The first argument of non-static methods, i.e. <code>self</code> or <code>cls</code>, is not counted as it is mandatory and it is passed automatically.