rspec/rules/S107/python/rule.adoc

43 lines
766 B
Plaintext

== Why is this an issue?
include::../description.adoc[]
=== Noncompliant code example
With a maximum number of 4 parameters:
[source,python]
----
def do_something(param1, param2, param3, param4, param5):
...
----
=== Compliant solution
[source,python]
----
def do_something(param1, param2, param3, param4):
...
----
=== Exceptions
The first argument of non-static methods, i.e. ``++self++`` or ``++cls++``, is not counted as it is mandatory and it is passed automatically.
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::parameters.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]