summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-03-18 07:54:31 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-03-18 07:54:31 -0400
commitf77693d90a615ae6e77825653bf647567c9305e8 (patch)
treedce404f7447dc0db8d50b4afacfec901f736ab85
parent1307eaa36ecfa908c13df2c3dbad0a0dc67027b4 (diff)
downloadpython-coveragepy-git-f77693d90a615ae6e77825653bf647567c9305e8.tar.gz
style: correct two recent lint faux pas
-rw-r--r--coverage/config.py2
-rw-r--r--coverage/inorout.py3
-rw-r--r--doc/source.rst22
3 files changed, 15 insertions, 12 deletions
diff --git a/coverage/config.py b/coverage/config.py
index e519fc62..a48251fb 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -35,7 +35,7 @@ class HandyConfigParser(configparser.RawConfigParser):
if our_file:
self.section_prefixes.append("")
- def read(self, filenames):
+ def read(self, filenames, encoding_unused=None):
"""Read a file name as UTF-8 configuration data."""
kwargs = {}
if env.PYVERSION >= (3, 2):
diff --git a/coverage/inorout.py b/coverage/inorout.py
index fbd1a95e..9c3040fc 100644
--- a/coverage/inorout.py
+++ b/coverage/inorout.py
@@ -243,6 +243,9 @@ class InOrOut(object):
# the frame's file name, then just use the original.
filename = original_filename
+ if self.debug:
+ self.debug.write("Considering filename {!r}".format(filename))
+
if not filename:
# Empty string is pretty useless.
return nope(disp, "empty string isn't a file name")
diff --git a/doc/source.rst b/doc/source.rst
index 9ca544ab..882befb3 100644
--- a/doc/source.rst
+++ b/doc/source.rst
@@ -27,17 +27,17 @@ all code, unless it is part of the Python standard library.
You can specify source to measure with the ``--source`` command-line switch, or
the ``[run] source`` configuration value. The value is a comma- or
-newline-separated list of directories or importable names (packages or modules).
-
-If the source option is specified, only
-code those locations will be measured. Specifying the
-source option also enables coverage.py to report on unexecuted files, since it
-can search the source tree for files that haven't been measured at all. Only
-importable files (ones at the root of the tree, or in directories with a
-``__init__.py`` file) will be considered. Files with unusual punctuation in
-their names will be skipped (they are assumed to be scratch files written by
-text editors). Files that do not end with ``.py`` or ``.pyo`` or ``.pyc``
-will also be skipped.
+newline-separated list of directories or importable names (packages or
+modules).
+
+If the source option is specified, only code those locations will be measured.
+Specifying the source option also enables coverage.py to report on unexecuted
+files, since it can search the source tree for files that haven't been measured
+at all. Only importable files (ones at the root of the tree, or in directories
+with a ``__init__.py`` file) will be considered. Files with unusual punctuation
+in their names will be skipped (they are assumed to be scratch files written by
+text editors). Files that do not end with ``.py`` or ``.pyo`` or ``.pyc`` will
+also be skipped.
You can further fine-tune coverage.py's attention with the ``--include`` and
``--omit`` switches (or ``[run] include`` and ``[run] omit`` configuration