45 lines
855 B
Plaintext
45 lines
855 B
Plaintext
== Why is this an issue?
|
|
|
|
The use of a ``++pass++`` statement where it's not required by the syntax is pure cruft and should be removed.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,python]
|
|
----
|
|
def __init__(self, log="", who="", date=0, files=[]):
|
|
self.log = log
|
|
self.files = files
|
|
self.who = who
|
|
self.date = date
|
|
pass # Noncompliant
|
|
|
|
def lookup():
|
|
pass # Compliant; method can't be empty
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,python]
|
|
----
|
|
def __init__(self, log="", who="", date=0, files=[]):
|
|
self.log = log
|
|
self.files = files
|
|
self.who = who
|
|
self.date = date
|
|
|
|
def lookup():
|
|
pass
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|