rspec/rules/S1940/python/rule.adoc

33 lines
498 B
Plaintext
Raw Normal View History

include::../description.adoc[]
== Noncompliant Code Example
[source,python]
----
if not a == 2: # Noncompliant
b = not i < 10 # Noncompliant
----
== Compliant Solution
[source,python]
----
if a != 2 :
b = i >= 10
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]