diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-07-16 07:30:45 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-07-16 07:30:45 -0400 |
commit | a4e8460cfa86fe7e9c82b01ade8b352bb93b695d (patch) | |
tree | 26b8d1f96406f51df8e1fc697557234430ed233a | |
parent | edc6c202061f70438d2044f186df86e0886ca418 (diff) | |
download | python-coveragepy-git-a4e8460cfa86fe7e9c82b01ade8b352bb93b695d.tar.gz |
PEP8 fixes, but too many to really fix
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | coverage/data.py | 10 | ||||
-rw-r--r-- | tests/test_data.py | 10 | ||||
-rw-r--r-- | tox.ini | 1 |
4 files changed, 12 insertions, 11 deletions
@@ -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) @@ -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 |