to keep Python 3.x compatibility, use six.moves.cStringIO to
replace StringIO
Change-Id: Id89c6156d9bba0007e8b16cd2cc28413a7cc5fd3
Closes-Bug: #
1280964
from __future__ import print_function
-import cStringIO as StringIO
import json
import re
import sys
from pylint import lint
from pylint.reporters import text
+from six.moves import cStringIO as StringIO
# Note(maoy): E1103 is error code related to partial type inference
ignore_codes = ["E1103"]
def run_pylint():
- buff = StringIO.StringIO()
+ buff = StringIO()
reporter = text.ParseableTextReporter(output=buff)
args = ["--include-ids=y", "-E", "cinder"]
lint.Run(args, reporter=reporter, exit=False)