summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt2
-rw-r--r--coverage/backward.py6
-rw-r--r--coverage/control.py4
-rw-r--r--setup.py2
4 files changed, 9 insertions, 5 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index e9d91286..768b582c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -27,7 +27,7 @@ Version 3.5
Closes `issue 107`, thanks, Brett Cannon.
- Installation from source now succeeds on machines without a C compiler,
- closing `issue 80`.
+ closing `issue 80`.
- Internally, files are now closed explicitly, fixing `issue 104`. Thanks,
Brett Cannon.
diff --git a/coverage/backward.py b/coverage/backward.py
index af6da629..e901d84f 100644
--- a/coverage/backward.py
+++ b/coverage/backward.py
@@ -81,19 +81,23 @@ except AttributeError:
"""Open a source file the best way."""
return open(fname, "rU")
-# Python 3.x is picky about bytes and strings, so provide methods to
+# Python 3.x is picky about bytes and strings, so provide methods to
# get them right, and make them no-ops in 2.x
if sys.version_info >= (3, 0):
def to_bytes(s):
+ """Convert string `s` to bytes."""
return s.encode('utf8')
def to_string(b):
+ """Convert bytes `b` to a string."""
return b.decode('utf8')
else:
def to_bytes(s):
+ """Convert string `s` to bytes (no-op in 2.x)."""
return s
def to_string(b):
+ """Convert bytes `b` to a string (no-op in 2.x)."""
return b
diff --git a/coverage/control.py b/coverage/control.py
index 514f23d9..3369d04e 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -226,8 +226,8 @@ class coverage(object):
self._check_for_packages()
# Compiled Python files have two filenames: frame.f_code.co_filename is
- # the filename at the time the .pyc was compiled. The second name
- # is __file__, which is where the .pyc was actually loaded from. Since
+ # the filename at the time the .pyc was compiled. The second name is
+ # __file__, which is where the .pyc was actually loaded from. Since
# .pyc files can be moved after compilation (for example, by being
# installed), we look for __file__ in the frame and prefer it to the
# co_filename value.
diff --git a/setup.py b/setup.py
index 5a39ad2c..3b4854cb 100644
--- a/setup.py
+++ b/setup.py
@@ -116,7 +116,7 @@ if sys.version_info >= (3, 0):
# extension. Try it with, and if it fails, try it without.
try:
setup(**setup_args)
-except:
+except: # pylint: disable=W0702
if 'ext_modules' not in setup_args:
raise
msg = "Couldn't install with extension module, trying without it..."