pylint, pep8 work.

This commit is contained in:
jevans 2013-08-18 14:48:17 -04:00
commit 5edbe6f078
7 changed files with 8 additions and 7 deletions

View file

@ -1308,7 +1308,7 @@ class QCCsegment(Segment):
self.offset = offset self.offset = offset
self.mantissa, self.exponent = parse_quantization(self.spqcc, self.mantissa, self.exponent = parse_quantization(self.spqcc,
self.sqcc) self.sqcc)
self.guard_bits = (self.sqcc & 0xe0) >> 5 self.guard_bits = (self.sqcc & 0xe0) >> 5
def __str__(self): def __str__(self):

View file

@ -30,7 +30,7 @@ NO_READ_BACKEND_MSG += "order to run the tests in this suite."
try: try:
from matplotlib.pyplot import imread from matplotlib.pyplot import imread
# The whole point of trying to import PIL is to determine if it's there # The whole point of trying to import PIL is to determine if it's there
# or not. We won't use it directly. # or not. We won't use it directly.
# pylint: disable=F0401,W0611 # pylint: disable=F0401,W0611
import PIL import PIL

View file

@ -91,7 +91,7 @@ class TestCallbacks15(unittest.TestCase):
def test_info_callbacks_on_read(self): def test_info_callbacks_on_read(self):
"""Verify stdout when reading. """Verify stdout when reading.
Verify that we get the expected stdio output when our internal info Verify that we get the expected stdio output when our internal info
callback handler is enabled. callback handler is enabled.
""" """

View file

@ -5,7 +5,7 @@ Test suite for codestream parsing.
# unittest doesn't work well with R0904. # unittest doesn't work well with R0904.
# pylint: disable=R0904 # pylint: disable=R0904
# tempfile.TemporaryDirectory, unittest.assertWarns introduced in 3.2 # tempfile.TemporaryDirectory, unittest.assertWarns introduced in 3.2
# pylint: disable=E1101 # pylint: disable=E1101
# unittest2 is python2.6 only (pylint/python-2.7) # unittest2 is python2.6 only (pylint/python-2.7)

View file

@ -4,7 +4,7 @@ OPENJP2 may be present in some form or other.
# unittest doesn't work well with R0904. # unittest doesn't work well with R0904.
# pylint: disable=R0904 # pylint: disable=R0904
# tempfile.TemporaryDirectory, unittest.assertWarns introduced in 3.2 # tempfile.TemporaryDirectory, unittest.assertWarns introduced in 3.2
# pylint: disable=E1101 # pylint: disable=E1101
# unittest.mock only in Python 3.3 (python2.7/pylint import issue) # unittest.mock only in Python 3.3 (python2.7/pylint import issue)

View file

@ -17,7 +17,7 @@ suite.
# unittest fools pylint with "too many public methods" # unittest fools pylint with "too many public methods"
# pylint: disable=R0904 # pylint: disable=R0904
# Some tests use numpy test infrastructure, which means the tests never # Some tests use numpy test infrastructure, which means the tests never
# reference "self", so pylint claims it should be a function. No, no, no. # reference "self", so pylint claims it should be a function. No, no, no.
# pylint: disable=R0201 # pylint: disable=R0201

View file

@ -441,7 +441,8 @@ class TestSuiteWrite(unittest.TestCase):
self.assertEqual(len(codestream.segment[2].spcod), 9) self.assertEqual(len(codestream.segment[2].spcod), 9)
# 18 SOP segments. # 18 SOP segments.
nsops = [x.nsop for x in codestream.segment if x.marker_id == 'SOP'] nsops = [x.nsop for x in codestream.segment
if x.marker_id == 'SOP']
self.assertEqual(nsops, list(range(18))) self.assertEqual(nsops, list(range(18)))
def test_NR_ENC_Bretagne2_ppm_7_encode(self): def test_NR_ENC_Bretagne2_ppm_7_encode(self):