rspec/rules/S1717/python/comments-and-links.adoc

38 lines
1.3 KiB
Plaintext
Raw Normal View History

=== on 4 Nov 2014, 15:59:00 Ann Campbell wrote:
pylint:W1401
=== on 17 Apr 2020, 15:18:27 Nicolas Harraudeau wrote:
Deprecating this rule.
It raises many issues and most of them look like False Positives. The most common false positives are strings containing regular expressions. Example:
----
import re
re.sub('\(', '[', '(test)') # False Positive
----
This rule raises 380+ issues just on Pypy.
We could try to reduce the number of false positives by focusing only on strings passed to functions which do not use backslashes, such as ``++print++`` or ``++Exception++``, but the value seems to be low. The worst that could happen is that the backslash is displayed as part of the string or that a few characters are misinterpreted:
----
In [36]: raise Exception("\.")
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-36-de3222772775> in <module>
----> 1 raise Exception("\.")
Exception: \.
In [41]: raise Exception("\234324")
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-41-d0bd825b64dd> in <module>
----> 1 raise Exception("\234324")
Exception: œ324
----