rspec/rules/S5855/python/rule.adoc

18 lines
268 B
Plaintext

include::../description.adoc[]
== Noncompliant Code Example
----
r"[ab]|a" # The "|a" is redundant because "[ab]" already matches "a"
r".*|a" # .* matches everything, so any other alternative is redundant
----
== Compliant Solution
----
r"[ab]"
r".*"
----