summaryrefslogtreecommitdiff
path: root/coverage
diff options
context:
space:
mode:
Diffstat (limited to 'coverage')
-rw-r--r--coverage/__init__.py2
-rw-r--r--coverage/backunittest.py4
-rw-r--r--coverage/cmdline.py2
-rw-r--r--coverage/config.py2
-rw-r--r--coverage/control.py10
-rw-r--r--coverage/files.py2
-rw-r--r--coverage/html.py3
-rw-r--r--coverage/parser.py2
-rw-r--r--coverage/phystokens.py12
-rw-r--r--coverage/pytracer.py4
-rw-r--r--coverage/templite.py4
11 files changed, 24 insertions, 23 deletions
diff --git a/coverage/__init__.py b/coverage/__init__.py
index 3a52c1d6..41da609b 100644
--- a/coverage/__init__.py
+++ b/coverage/__init__.py
@@ -18,7 +18,7 @@ coverage = Coverage
# Module-level functions. The original API to this module was based on
# functions defined directly in the module, with a singleton of the Coverage()
-# class. That design hampered programmability, so the current api uses
+# class. That design hampered programmability, so the current API uses
# explicitly-created Coverage objects. But for backward compatibility, here we
# define the top-level functions to create the singleton when they are first
# called.
diff --git a/coverage/backunittest.py b/coverage/backunittest.py
index 648e74ef..95b6fcc6 100644
--- a/coverage/backunittest.py
+++ b/coverage/backunittest.py
@@ -1,7 +1,7 @@
"""Implementations of unittest features from the future."""
# Use unittest2 if it's available, otherwise unittest. This gives us
-# backported features for 2.6.
+# back-ported features for 2.6.
try:
import unittest2 as unittest
except ImportError:
@@ -9,7 +9,7 @@ except ImportError:
def unittest_has(method):
- """Does `unitttest.TestCase` have `method` defined?"""
+ """Does `unittest.TestCase` have `method` defined?"""
return hasattr(unittest.TestCase, method)
diff --git a/coverage/cmdline.py b/coverage/cmdline.py
index 1b4d322c..7ad0ca1e 100644
--- a/coverage/cmdline.py
+++ b/coverage/cmdline.py
@@ -512,7 +512,7 @@ class CoverageScript(object):
def args_ok(self, options, args):
"""Check for conflicts and problems in the options.
- Returns True if everything is ok, or False if not.
+ Returns True if everything is OK, or False if not.
"""
if options.action == "run" and not args:
diff --git a/coverage/config.py b/coverage/config.py
index 9bd5dd5f..d15810e4 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -5,7 +5,7 @@ from coverage.backward import string_class, iitems
from coverage.misc import CoverageException
-# In py3, # ConfigParser was renamed to the more-standard configparser
+# In py3, ConfigParser was renamed to the more-standard configparser
try:
import configparser
except ImportError:
diff --git a/coverage/control.py b/coverage/control.py
index 6aa06da8..c59424df 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -315,7 +315,7 @@ class Coverage(object):
If loaded via runpy (aka -m), we can usually recover the "original" full
dotted module name, otherwise, we resort to interpreting the filename to
get the module's name. In the case that the module name can't be
- deteremined, None is returned.
+ determined, None is returned.
"""
dunder_name = module_globals.get('__name__', None)
@@ -335,7 +335,7 @@ class Coverage(object):
# Module loaded via: runpy -m
return fullname
- # Script as first argument to Python CLI.
+ # Script as first argument to Python command line.
inspectedname = inspect.getmodulename(filename)
if inspectedname is not None:
return inspectedname
@@ -695,7 +695,7 @@ class Coverage(object):
if self.omit_match and self.omit_match.match(py_file):
# Turns out this file was omitted, so don't pull it back
- # in as unexecuted.
+ # in as un-executed.
continue
self.data.touch_file(py_file)
@@ -943,7 +943,7 @@ class FileDisposition(object):
def process_startup():
- """Call this at Python startup to perhaps measure coverage.
+ """Call this at Python start-up to perhaps measure coverage.
If the environment variable COVERAGE_PROCESS_START is defined, coverage
measurement is started. The value of the variable is the config file
@@ -970,5 +970,5 @@ def process_startup():
cov._warn_unimported_source = False
-# A hack for debugging testing in subprocesses.
+# A hack for debugging testing in sub-processes.
_TEST_NAME_FILE = "" #"/tmp/covtest.txt"
diff --git a/coverage/files.py b/coverage/files.py
index 7c82d5f7..31fe61a2 100644
--- a/coverage/files.py
+++ b/coverage/files.py
@@ -322,7 +322,7 @@ def find_python_files(dirname):
To be importable, the files have to be in a directory with a __init__.py,
except for `dirname` itself, which isn't required to have one. The
assumption is that `dirname` was specified directly, so the user knows
- best, but subdirectories are checked for a __init__.py to be sure we only
+ best, but sub-directories are checked for a __init__.py to be sure we only
find the importable files.
"""
diff --git a/coverage/html.py b/coverage/html.py
index 37d62280..a4b46a23 100644
--- a/coverage/html.py
+++ b/coverage/html.py
@@ -26,7 +26,7 @@ def data_filename(fname, pkgdir=""):
is returned.
Each directory in `STATIC_PATH` is searched as-is, and also, if `pkgdir`
- is provided, at that subdirectory.
+ is provided, at that sub-directory.
"""
for static_dir in STATIC_PATH:
@@ -289,6 +289,7 @@ class HtmlStatus(object):
STATUS_FILE = "status.json"
STATUS_FORMAT = 1
+ # pylint: disable=wrong-spelling-in-comment
# The data looks like:
#
# {
diff --git a/coverage/parser.py b/coverage/parser.py
index 9041e349..ae36a738 100644
--- a/coverage/parser.py
+++ b/coverage/parser.py
@@ -237,7 +237,7 @@ class PythonParser(CodeParser):
"""Get information about the arcs available in the code.
Returns a sorted list of line number pairs. Line numbers have been
- normalized to the first line of multiline statements.
+ normalized to the first line of multi-line statements.
"""
all_arcs = []
diff --git a/coverage/phystokens.py b/coverage/phystokens.py
index 867388f7..fe77c7de 100644
--- a/coverage/phystokens.py
+++ b/coverage/phystokens.py
@@ -42,7 +42,7 @@ def phys_tokens(toks):
inject_backslash = False
elif ttype == token.STRING:
if "\n" in ttext and ttext.split('\n', 1)[0][-1] == '\\':
- # It's a multiline string and the first line ends with
+ # It's a multi-line string and the first line ends with
# a backslash, so we don't need to inject another.
inject_backslash = False
if inject_backslash:
@@ -136,10 +136,10 @@ def source_encoding(source):
return orig_enc
# From detect_encode():
- # It detects the encoding from the presence of a utf-8 bom or an encoding
- # cookie as specified in pep-0263. If both a bom and a cookie are present,
+ # It detects the encoding from the presence of a UTF-8 BOM or an encoding
+ # cookie as specified in PEP-0263. If both a BOM and a cookie are present,
# but disagree, a SyntaxError will be raised. If the encoding cookie is an
- # invalid charset, raise a SyntaxError. Note that if a utf-8 bom is found,
+ # invalid charset, raise a SyntaxError. Note that if a UTF-8 BOM is found,
# 'utf-8-sig' is returned.
# If no encoding is specified, then the default will be returned.
@@ -169,14 +169,14 @@ def source_encoding(source):
try:
codec = codecs.lookup(encoding)
except LookupError:
- # This behaviour mimics the Python interpreter
+ # This behavior mimics the Python interpreter
raise SyntaxError("unknown encoding: " + encoding)
if bom_found:
# codecs in 2.3 were raw tuples of functions, assume the best.
codec_name = getattr(codec, 'name', encoding)
if codec_name != 'utf-8':
- # This behaviour mimics the Python interpreter
+ # This behavior mimics the Python interpreter
raise SyntaxError('encoding problem: utf-8')
encoding += '-sig'
return encoding
diff --git a/coverage/pytracer.py b/coverage/pytracer.py
index f3f490a0..c2008d0d 100644
--- a/coverage/pytracer.py
+++ b/coverage/pytracer.py
@@ -146,8 +146,8 @@ class PyTracer(object):
self.stopped = True
if self.threading and self.thread != self.threading.currentThread():
# Called on a different thread than started us: we can't unhook
- # ourseves, but we've set the flag that we should stop, so we won't
- # do any more tracing.
+ # ourselves, but we've set the flag that we should stop, so we
+ # won't do any more tracing.
return
if self.warn:
diff --git a/coverage/templite.py b/coverage/templite.py
index 53824e08..5877c058 100644
--- a/coverage/templite.py
+++ b/coverage/templite.py
@@ -61,7 +61,7 @@ class Templite(object):
Supported constructs are extended variable access::
- {{var.modifer.modifier|filter|filter}}
+ {{var.modifier.modifier|filter|filter}}
loops::
@@ -241,7 +241,7 @@ class Templite(object):
return self._render_function(render_context, self._do_dots)
def _do_dots(self, value, *dots):
- """Evaluate dotted expressions at runtime."""
+ """Evaluate dotted expressions at run-time."""
for dot in dots:
try:
value = getattr(value, dot)