From a4e8460cfa86fe7e9c82b01ade8b352bb93b695d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 16 Jul 2015 07:30:45 -0400 Subject: PEP8 fixes, but too many to really fix --- Makefile | 2 +- coverage/data.py | 10 +++++----- tests/test_data.py | 10 +++++----- tox.ini | 1 + 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index b755d07e..8ba17dfa 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ spell: -pylint --disable=all --enable=spelling $(LINTABLE) pep8: - pep8 --filename=*.py --ignore=E401,E301 --repeat coverage + pep8 --filename=*.py --ignore=E401,E301 --repeat $(LINTABLE) test: tox -e py27 $(ARGS) diff --git a/coverage/data.py b/coverage/data.py index db575e17..7b9dd7ea 100644 --- a/coverage/data.py +++ b/coverage/data.py @@ -113,13 +113,13 @@ class CoverageData(object): # Unpack the 'lines' item. self._lines = dict([ (f, dict.fromkeys(linenos, None)) - for f, linenos in iitems(data.get('lines', {})) - ]) + for f, linenos in iitems(data.get('lines', {})) + ]) # Unpack the 'arcs' item. self._arcs = dict([ (f, dict.fromkeys(arcpairs, None)) - for f, arcpairs in iitems(data.get('arcs', {})) - ]) + for f, arcpairs in iitems(data.get('arcs', {})) + ]) self._plugins = data.get('plugins', {}) except Exception: # TODO: this used to handle file-doesnt-exist problems. Do we still need it? @@ -279,7 +279,7 @@ class CoverageDataFiles(object): suffix = "%s%s.%s.%06d" % ( socket.gethostname(), extra, os.getpid(), random.randint(0, 999999) - ) + ) if suffix: filename += "." + suffix diff --git a/tests/test_data.py b/tests/test_data.py index 1f0aecfd..b78e21eb 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -155,14 +155,14 @@ class DataTest(DataTestHelpers, CoverageTest): covdata1.add_lines({ '/home/ned/proj/src/a.py': {1: None, 2: None}, '/home/ned/proj/src/sub/b.py': {3: None}, - }) + }) self.data_files.write(covdata1, suffix='1') covdata2 = CoverageData() covdata2.add_lines({ r'c:\ned\test\a.py': {4: None, 5: None}, r'c:\ned\test\sub\b.py': {6: None}, - }) + }) self.data_files.write(covdata2, suffix='2') covdata3 = CoverageData() @@ -174,8 +174,8 @@ class DataTest(DataTestHelpers, CoverageTest): apy = canonical_filename('./a.py') sub_bpy = canonical_filename('./sub/b.py') - self.assert_summary(covdata3, { apy: 4, sub_bpy: 2 }, fullpath=True) - self.assert_measured_files(covdata3, [apy,sub_bpy]) + self.assert_summary(covdata3, {apy: 4, sub_bpy: 2}, fullpath=True) + self.assert_measured_files(covdata3, [apy, sub_bpy]) class DataTestInTempDir(DataTestHelpers, CoverageTest): @@ -198,7 +198,7 @@ class DataTestInTempDir(DataTestHelpers, CoverageTest): self.data_files.combine_parallel_data(covdata3, data_dirs=[ 'cov1/', 'cov2/', - ]) + ]) self.assert_summary(covdata3, SUMMARY_1_2) self.assert_measured_files(covdata3, MEASURED_FILES_1_2) diff --git a/tox.ini b/tox.ini index a5abd8d0..6c94c95d 100644 --- a/tox.ini +++ b/tox.ini @@ -52,3 +52,4 @@ basepython = pypy3-2.4 # E265: block comment should start with '# ' # The rest are the default ignored warnings. ignore = E265,E123,E133,E226,E241,E242 +max-line-length = 100 -- cgit v1.2.1