1. Jonathan Kotta
  2. pylint

Commits

tma...@google.com  committed 73472a5

Change the regular expression for inline options so that a preceeding # is not optional.

  • Participants
  • Parent commits 83dc19b
  • Branches default

Comments (0)

Files changed (3)

File ChangeLog

View file
       A.Fayolle)
 
 
+    * Changed the regular expression for inline options so that
+      it must be preceeded by a # (patch by Torsten Marek)
+
 2012-10-05  --  0.26.0
     * #106534: add --ignore-imports option to code similarity checking
       and 'symilar' command line tool (patch by Ry4an Brase)

File lint.py

View file
 from pylint.__pkginfo__ import version
 
 
-OPTION_RGX = re.compile(r'\s*#*\s*pylint:(.*)')
+OPTION_RGX = re.compile(r'\s*#.*\bpylint:(.*)')
 REPORTER_OPT_MAP = {'text': TextReporter,
                     'parseable': ParseableTextReporter,
                     'msvs': VSTextReporter,

File test/input/func_i0010.py

View file
 # pylint: errors-only
 """errors-only is not usable as an inline option"""
 __revision__ = None
+
+CONST = "This is not a pylint: inline option."