Commits

Ned Batchelder  committed 0b6f3e6

Clean-ups

  • Participants
  • Parent commits 933d4c8

Comments (0)

Files changed (4)

   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.

File coverage/backward.py

         """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
 

File coverage/control.py

         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.
 # 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..."