From 5edbe6f078ff12b2d64df5757145cca6104fa7d3 Mon Sep 17 00:00:00 2001 From: jevans Date: Sun, 18 Aug 2013 14:48:17 -0400 Subject: [PATCH] pylint, pep8 work. --- glymur/codestream.py | 2 +- glymur/test/fixtures.py | 2 +- glymur/test/test_callbacks.py | 2 +- glymur/test/test_codestream.py | 2 +- glymur/test/test_config.py | 2 +- glymur/test/test_opj_suite.py | 2 +- glymur/test/test_opj_suite_write.py | 3 ++- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/glymur/codestream.py b/glymur/codestream.py index 7a32190..e83c5cc 100644 --- a/glymur/codestream.py +++ b/glymur/codestream.py @@ -1308,7 +1308,7 @@ class QCCsegment(Segment): self.offset = offset self.mantissa, self.exponent = parse_quantization(self.spqcc, - self.sqcc) + self.sqcc) self.guard_bits = (self.sqcc & 0xe0) >> 5 def __str__(self): diff --git a/glymur/test/fixtures.py b/glymur/test/fixtures.py index 1c196fb..eec9e22 100644 --- a/glymur/test/fixtures.py +++ b/glymur/test/fixtures.py @@ -30,7 +30,7 @@ NO_READ_BACKEND_MSG += "order to run the tests in this suite." try: 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. # pylint: disable=F0401,W0611 import PIL diff --git a/glymur/test/test_callbacks.py b/glymur/test/test_callbacks.py index 992ca3a..722c5da 100644 --- a/glymur/test/test_callbacks.py +++ b/glymur/test/test_callbacks.py @@ -91,7 +91,7 @@ class TestCallbacks15(unittest.TestCase): def test_info_callbacks_on_read(self): """Verify stdout when reading. - + Verify that we get the expected stdio output when our internal info callback handler is enabled. """ diff --git a/glymur/test/test_codestream.py b/glymur/test/test_codestream.py index f9d4d75..8db5039 100644 --- a/glymur/test/test_codestream.py +++ b/glymur/test/test_codestream.py @@ -5,7 +5,7 @@ Test suite for codestream parsing. # unittest doesn't work well with R0904. # pylint: disable=R0904 -# tempfile.TemporaryDirectory, unittest.assertWarns introduced in 3.2 +# tempfile.TemporaryDirectory, unittest.assertWarns introduced in 3.2 # pylint: disable=E1101 # unittest2 is python2.6 only (pylint/python-2.7) diff --git a/glymur/test/test_config.py b/glymur/test/test_config.py index b475b91..3a70ee1 100644 --- a/glymur/test/test_config.py +++ b/glymur/test/test_config.py @@ -4,7 +4,7 @@ OPENJP2 may be present in some form or other. # unittest doesn't work well with R0904. # pylint: disable=R0904 -# tempfile.TemporaryDirectory, unittest.assertWarns introduced in 3.2 +# tempfile.TemporaryDirectory, unittest.assertWarns introduced in 3.2 # pylint: disable=E1101 # unittest.mock only in Python 3.3 (python2.7/pylint import issue) diff --git a/glymur/test/test_opj_suite.py b/glymur/test/test_opj_suite.py index a264019..c622f44 100644 --- a/glymur/test/test_opj_suite.py +++ b/glymur/test/test_opj_suite.py @@ -17,7 +17,7 @@ suite. # unittest fools pylint with "too many public methods" # 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. # pylint: disable=R0201 diff --git a/glymur/test/test_opj_suite_write.py b/glymur/test/test_opj_suite_write.py index 6cc37f3..e6f1575 100644 --- a/glymur/test/test_opj_suite_write.py +++ b/glymur/test/test_opj_suite_write.py @@ -441,7 +441,8 @@ class TestSuiteWrite(unittest.TestCase): self.assertEqual(len(codestream.segment[2].spcod), 9) # 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))) def test_NR_ENC_Bretagne2_ppm_7_encode(self):