rspec/rules/S107/python/rule.adoc

22 lines
414 B
Plaintext
Raw Normal View History

2020-06-30 10:16:44 +02:00
include::../description.adoc[]
== Noncompliant Code Example
With a maximum number of 4 parameters:
2020-06-30 10:16:44 +02:00
----
def do_something(param1, param2, param3, param4, param5):
...
----
== Compliant Solution
----
def do_something(param1, param2, param3, param4):
...
----
== Exceptions
2020-12-23 14:59:06 +01:00
The first argument of non-static methods, i.e. ``self`` or ``cls``, is not counted as it is mandatory and it is passed automatically.