summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-11-28 05:45:33 -0500
committerNed Batchelder <ned@nedbatchelder.com>2022-11-28 06:01:22 -0500
commitaa62abd5ff33926f44fe4ec9e985ed3d72ea1f9d (patch)
tree301823a5d57e89561e0761d48cd2cf68a6d501c7
parent79c66c00cfc98f04b676e8fb32dc5f089a5eff3c (diff)
downloadpython-coveragepy-git-aa62abd5ff33926f44fe4ec9e985ed3d72ea1f9d.tar.gz
style: fix spelling
un-executed, white space, time stamp.
-rw-r--r--CHANGES.rst16
-rw-r--r--coverage/config.py4
-rw-r--r--coverage/control.py4
-rw-r--r--coverage/inorout.py2
-rw-r--r--coverage/parser.py5
-rw-r--r--coverage/phystokens.py2
-rw-r--r--coverage/results.py2
-rw-r--r--coverage/templite.py2
-rw-r--r--doc/changes.rst26
-rw-r--r--doc/cmd.rst2
-rw-r--r--doc/config.rst6
-rw-r--r--doc/dict.txt3
-rw-r--r--doc/source.rst2
-rw-r--r--igor.py8
-rw-r--r--tests/mixins.py2
-rw-r--r--tests/test_api.py12
-rw-r--r--tests/test_html.py10
-rw-r--r--tests/test_phystokens.py2
18 files changed, 53 insertions, 57 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index eae8d6c9..63114d2a 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -39,12 +39,12 @@ released.)
- Combining data files with ``coverage combine`` now quickly hashes the data
files to skip files that provide no new information. This can reduce the
- time needed. Many details affect the results, but for coverage.py's own test
- suite, combining was about 40% faster. Closes `issue 1483`_.
+ time needed. Many details affect the speed-up, but for coverage.py's own
+ test suite, combining was about 40% faster. Closes `issue 1483`_.
-- When searching for completely unexecuted files, coverage.py uses the presence
- of ``__init__.py`` files to determine which directories have source that
- could have been imported. However, `implicit namespace packages`_ don't
+- When searching for completely un-executed files, coverage.py uses the
+ presence of ``__init__.py`` files to determine which directories have source
+ that could have been imported. However, `implicit namespace packages`_ don't
require ``__init__.py``. A new setting ``[report]
include_namespace_packages`` tells coverage.py to consider these directories
during reporting. Thanks to `Felix Horvat <pull 1387_>`_ for the
@@ -191,7 +191,7 @@ Version 6.4.2 — 2022-07-12
--------------------------
- Updated for a small change in Python 3.11.0 beta 4: modules now start with a
- line with line number 0, which is ignored. This line cannnot be executed, so
+ line with line number 0, which is ignored. This line cannot be executed, so
coverage totals were thrown off. This line is now ignored by coverage.py,
but this also means that truly empty modules (like ``__init__.py``) have no
lines in them, rather than one phantom line. Fixes `issue 1419`_.
@@ -242,7 +242,7 @@ Version 6.4 — 2022-05-22
``?`` to open/close the help panel. Thanks, `J. M. F. Tsang
<pull 1364_>`_.
- - The timestamp and version are displayed at the top of the report. Thanks,
+ - The time stamp and version are displayed at the top of the report. Thanks,
`Ammar Askar <pull 1354_>`_. Closes `issue 1351`_.
- A new debug option ``debug=sqldata`` adds more detail to ``debug=sql``,
@@ -531,7 +531,7 @@ Version 6.0.2 — 2021-10-11
- Packages named as "source packages" (with ``source``, or ``source_pkgs``, or
pytest-cov's ``--cov``) might have been only partially measured. Their
- top-level statements could be marked as unexecuted, because they were
+ top-level statements could be marked as un-executed, because they were
imported by coverage.py before measurement began (`issue 1232`_). This is
now fixed, but the package will be imported twice, once by coverage.py, then
again by your test suite. This could cause problems if importing the package
diff --git a/coverage/config.py b/coverage/config.py
index 994154f6..b964ba89 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -93,7 +93,7 @@ class HandyConfigParser(configparser.ConfigParser):
"""Read a list of strings.
The value of `section` and `option` is treated as a comma- and newline-
- separated list of strings. Each value is stripped of whitespace.
+ separated list of strings. Each value is stripped of white space.
Returns the list of strings.
@@ -111,7 +111,7 @@ class HandyConfigParser(configparser.ConfigParser):
"""Read a list of full-line regexes.
The value of `section` and `option` is treated as a newline-separated
- list of regexes. Each value is stripped of whitespace.
+ list of regexes. Each value is stripped of white space.
Returns the list of strings.
diff --git a/coverage/control.py b/coverage/control.py
index bbb26355..37e61cfb 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -812,7 +812,7 @@ class Coverage:
"""After saving data, look for warnings, post-work, etc.
Warn about things that should have happened but didn't.
- Look for unexecuted files.
+ Look for un-executed files.
"""
# If there are still entries in the source_pkgs_unmatched list,
@@ -825,7 +825,7 @@ class Coverage:
self._warn("No data was collected.", slug="no-data-collected")
# Touch all the files that could have executed, so that we can
- # mark completely unexecuted files as 0% covered.
+ # mark completely un-executed files as 0% covered.
if self._data is not None:
file_paths = collections.defaultdict(list)
for file_path, plugin_name in self._inorout.find_possibly_unexecuted_files():
diff --git a/coverage/inorout.py b/coverage/inorout.py
index 0d3f6d67..d69837f9 100644
--- a/coverage/inorout.py
+++ b/coverage/inorout.py
@@ -576,7 +576,7 @@ class InOrOut:
file_path = canonical_filename(file_path)
if self.omit_match and self.omit_match.match(file_path):
# Turns out this file was omitted, so don't pull it back
- # in as unexecuted.
+ # in as un-executed.
continue
yield file_path, plugin_name
diff --git a/coverage/parser.py b/coverage/parser.py
index 135a3b18..1bf1951a 100644
--- a/coverage/parser.py
+++ b/coverage/parser.py
@@ -177,11 +177,10 @@ class PythonParser:
first_on_line = True
if ttext.strip() and toktype != tokenize.COMMENT:
- # A non-whitespace token.
+ # A non-white-space token.
empty = False
if first_line is None:
- # The token is not whitespace, and is the first in a
- # statement.
+ # The token is not white space, and is the first in a statement.
first_line = slineno
# Check whether to end an excluded suite.
if excluding and indent <= exclude_indent:
diff --git a/coverage/phystokens.py b/coverage/phystokens.py
index 07ad5349..d1181939 100644
--- a/coverage/phystokens.py
+++ b/coverage/phystokens.py
@@ -95,7 +95,7 @@ def source_token_lines(source):
If you concatenate all the token texts, and then join them with newlines,
you should have your original `source` back, with two differences:
- trailing whitespace is not preserved, and a final line with no newline
+ trailing white space is not preserved, and a final line with no newline
is indistinguishable from a final line with a newline.
"""
diff --git a/coverage/results.py b/coverage/results.py
index 493d2fc8..2c97a18f 100644
--- a/coverage/results.py
+++ b/coverage/results.py
@@ -84,7 +84,7 @@ class Analysis:
@contract(returns='list(tuple(int, int))')
def arcs_missing(self):
- """Returns a sorted list of the unexecuted arcs in the code."""
+ """Returns a sorted list of the un-executed arcs in the code."""
possible = self.arc_possibilities()
executed = self.arcs_executed()
missing = (
diff --git a/coverage/templite.py b/coverage/templite.py
index ab3cf1cf..29596d77 100644
--- a/coverage/templite.py
+++ b/coverage/templite.py
@@ -92,7 +92,7 @@ class Templite:
and joined. Be careful, this could join words together!
Any of these constructs can have a hyphen at the end (`-}}`, `-%}`, `-#}`),
- which will collapse the whitespace following the tag.
+ which will collapse the white space following the tag.
Construct a Templite with the template text, then use `render` against a
dictionary context to create a finished string::
diff --git a/doc/changes.rst b/doc/changes.rst
index 42af57c7..da0f45ae 100644
--- a/doc/changes.rst
+++ b/doc/changes.rst
@@ -383,7 +383,7 @@ Version 5.0a6 — 2019-07-16
argument, `no_disk` (default: False). Setting it to True prevents writing
any data to the disk. This is useful for transient data objects.
-- Added the classmethod :meth:`.Coverage.current` to get the latest started
+- Added the class method :meth:`.Coverage.current` to get the latest started
Coverage instance.
- Multiprocessing support in Python 3.8 was broken, but is now fixed. Closes
@@ -556,7 +556,7 @@ Version 5.0a2 — 2018-09-03
- Development moved from `Bitbucket`_ to `GitHub`_.
-- HTML files no longer have trailing and extra whitespace.
+- HTML files no longer have trailing and extra white space.
- The sort order in the HTML report is stored in local storage rather than
cookies, closing `issue 611`_. Thanks, Federico Bond.
@@ -794,7 +794,7 @@ Version 4.4b1 — 2017-04-04
also continue measurement. Both `issue 79`_ and `issue 448`_ described this
problem, and have been fixed.
-- Plugins can now find unexecuted files if they choose, by implementing the
+- Plugins can now find un-executed files if they choose, by implementing the
`find_executable_files` method. Thanks, Emil Madsen.
- Minimal IronPython support. You should be able to run IronPython programs
@@ -1202,7 +1202,7 @@ Version 4.1b2 — 2016-01-23
- The XML report now produces correct package names for modules found in
directories specified with ``source=``. Fixes `issue 465`_.
-- ``coverage report`` won't produce trailing whitespace.
+- ``coverage report`` won't produce trailing white space.
.. _issue 465: https://github.com/nedbat/coveragepy/issues/465
.. _issue 466: https://github.com/nedbat/coveragepy/issues/466
@@ -1532,7 +1532,7 @@ Version 4.0a6 — 2015-06-21
- Files with incorrect encoding declaration comments are no longer ignored by
the reporting commands, fixing `issue 351`_.
-- HTML reports now include a timestamp in the footer, closing `issue 299`_.
+- HTML reports now include a time stamp in the footer, closing `issue 299`_.
Thanks, Conrad Ho.
- HTML reports now begrudgingly use double-quotes rather than single quotes,
@@ -1685,7 +1685,7 @@ Version 4.0a2 — 2015-01-14
`issue 328`_. Thanks, Buck Evan.
- The regex for matching exclusion pragmas has been fixed to allow more kinds
- of whitespace, fixing `issue 334`_.
+ of white space, fixing `issue 334`_.
- Made some PyPy-specific tweaks to improve speed under PyPy. Thanks, Alex
Gaynor.
@@ -1739,7 +1739,7 @@ Version 4.0a1 — 2014-09-27
`issue 285`_. Thanks, Chris Rose.
- HTML reports no longer raise UnicodeDecodeError if a Python file has
- undecodable characters, fixing `issue 303`_ and `issue 331`_.
+ un-decodable characters, fixing `issue 303`_ and `issue 331`_.
- The annotate command will now annotate all files, not just ones relative to
the current directory, fixing `issue 57`_.
@@ -1791,7 +1791,7 @@ Version 3.7 — 2013-10-06
- Coverage.py properly supports .pyw files, fixing `issue 261`_.
- Omitting files within a tree specified with the ``source`` option would
- cause them to be incorrectly marked as unexecuted, as described in
+ cause them to be incorrectly marked as un-executed, as described in
`issue 218`_. This is now fixed.
- When specifying paths to alias together during data combining, you can now
@@ -1802,7 +1802,7 @@ Version 3.7 — 2013-10-06
(``build/$BUILDNUM/src``).
- Trying to create an XML report with no files to report on, would cause a
- ZeroDivideError, but no longer does, fixing `issue 250`_.
+ ZeroDivisionError, but no longer does, fixing `issue 250`_.
- When running a threaded program under the Python tracer, coverage.py no
longer issues a spurious warning about the trace function changing: "Trace
@@ -1905,7 +1905,7 @@ Version 3.6b1 — 2012-11-28
Thanks, Marcus Cobden.
- Coverage percentage metrics are now computed slightly differently under
- branch coverage. This means that completely unexecuted files will now
+ branch coverage. This means that completely un-executed files will now
correctly have 0% coverage, fixing `issue 156`_. This also means that your
total coverage numbers will generally now be lower if you are measuring
branch coverage.
@@ -2068,7 +2068,7 @@ Version 3.5.2b1 — 2012-04-29
- Now the exit status of your product code is properly used as the process
status when running ``python -m coverage run ...``. Thanks, JT Olds.
-- When installing into pypy, we no longer attempt (and fail) to compile
+- When installing into PyPy, we no longer attempt (and fail) to compile
the C tracer function, closing `issue 166`_.
.. _issue 142: https://github.com/nedbat/coveragepy/issues/142
@@ -2234,7 +2234,7 @@ Version 3.4 — 2010-09-19
Version 3.4b2 — 2010-09-06
--------------------------
-- Completely unexecuted files can now be included in coverage results, reported
+- Completely un-executed files can now be included in coverage results, reported
as 0% covered. This only happens if the --source option is specified, since
coverage.py needs guidance about where to look for source files.
@@ -2374,7 +2374,7 @@ Version 3.3 — 2010-02-24
`config_file=False`.
- Fixed a problem with nested loops having their branch possibilities
- mischaracterized: `issue 39`_.
+ mis-characterized: `issue 39`_.
- Added coverage.process_start to enable coverage measurement when Python
starts.
diff --git a/doc/cmd.rst b/doc/cmd.rst
index 919b6d88..663ca708 100644
--- a/doc/cmd.rst
+++ b/doc/cmd.rst
@@ -1025,7 +1025,7 @@ of operation to log:
* ``plugin``: print information about plugin operations.
* ``process``: show process creation information, and changes in the current
- directory. This also writes a timestamp and command arguments into the data
+ directory. This also writes a time stamp and command arguments into the data
file.
* ``pybehave``: show the values of `internal flags <env.py_>`_ describing the
diff --git a/doc/config.rst b/doc/config.rst
index ea16d9f2..b387deb5 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -419,9 +419,9 @@ See :ref:`source` for details.
[report] include_namespace_packages
...................................
-(boolean, default False) When searching for completely unexecuted files,
+(boolean, default False) When searching for completely un-executed files,
include directories without ``__init__.py`` files. These are `implicit
-namespace packages`_, and are ususally skipped.
+namespace packages`_, and are usually skipped.
.. _implicit namespace packages: https://peps.python.org/pep-0420/
@@ -617,7 +617,7 @@ section also apply to JSON output, where appropriate.
[json] pretty_print
...................
-(boolean, default false) Controls if the JSON is outputted with whitespace
+(boolean, default false) Controls if the JSON is outputted with white space
formatted for human consumption (True) or for minimum file size (False).
diff --git a/doc/dict.txt b/doc/dict.txt
index 2c713fe7..63544dcd 100644
--- a/doc/dict.txt
+++ b/doc/dict.txt
@@ -221,7 +221,6 @@ templite
templating
testability
Tidelift
-timestamp
todo
TODO
tokenization
@@ -241,7 +240,6 @@ txt
ubuntu
undecodable
unexecutable
-unexecuted
unicode
uninstall
unittest
@@ -256,7 +254,6 @@ utf
vendored
versionadded
virtualenv
-whitespace
wikipedia
wildcard
wildcards
diff --git a/doc/source.rst b/doc/source.rst
index 64ebd132..41f6fc93 100644
--- a/doc/source.rst
+++ b/doc/source.rst
@@ -32,7 +32,7 @@ modules).
If the source option is specified, only code in 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
+un-executed 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
diff --git a/igor.py b/igor.py
index 40fc94b8..e23a2f68 100644
--- a/igor.py
+++ b/igor.py
@@ -276,7 +276,7 @@ def do_zip_mods():
def do_check_eol():
- """Check files for incorrect newlines and trailing whitespace."""
+ """Check files for incorrect newlines and trailing white space."""
ignore_dirs = [
'.svn', '.hg', '.git',
@@ -290,7 +290,7 @@ def do_check_eol():
checked = set()
def check_file(fname, crlf=True, trail_white=True):
- """Check a single file for whitespace abuse."""
+ """Check a single file for white space abuse."""
fname = os.path.relpath(fname)
if fname in checked:
return
@@ -308,14 +308,14 @@ def do_check_eol():
if not crlf:
line = line.rstrip(b'\r')
if line.rstrip() != line:
- print(f"{fname}@{n}: trailing whitespace found")
+ print(f"{fname}@{n}: trailing white space found")
return
if line is not None and not line.strip():
print(f"{fname}: final blank line")
def check_files(root, patterns, **kwargs):
- """Check a number of files for whitespace abuse."""
+ """Check a number of files for white space abuse."""
for where, dirs, files in os.walk(root):
for f in files:
fname = os.path.join(where, f)
diff --git a/tests/mixins.py b/tests/mixins.py
index 3d623fb3..9be6d21c 100644
--- a/tests/mixins.py
+++ b/tests/mixins.py
@@ -99,7 +99,7 @@ class RestoreModulesMixin:
# So that we can re-import files, clean them out first.
self._sys_module_saver.restore()
- # Also have to clean out the .pyc files, since the timestamp
+ # Also have to clean out the .pyc files, since the time stamp
# resolution is only one second, a changed file might not be
# picked up.
remove_tree("__pycache__")
diff --git a/tests/test_api.py b/tests/test_api.py
index c2dbefa8..84457d88 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -817,7 +817,7 @@ class IncludeOmitTestsMixin(UsingModulesMixin, CoverageTest):
self.filenames_in(result, "p1a p1b p2a p2b othera otherb osa osb")
self.filenames_not_in(result, "p1c")
# Because there was no source= specified, we don't search for
- # unexecuted files.
+ # un-executed files.
def test_include(self):
result = self.coverage_usepkgs(include=["*/p1a.py"])
@@ -902,7 +902,7 @@ class SourceIncludeOmitTest(IncludeOmitTestsMixin, CoverageTest):
lines = self.coverage_usepkgs(source=["pkg1"])
self.filenames_in(lines, "p1a p1b")
self.filenames_not_in(lines, "p2a p2b othera otherb osa osb")
- # Because source= was specified, we do search for unexecuted files.
+ # Because source= was specified, we do search for un-executed files.
assert lines['p1c'] == 0
def test_source_package_as_dir(self):
@@ -911,13 +911,13 @@ class SourceIncludeOmitTest(IncludeOmitTestsMixin, CoverageTest):
lines = self.coverage_usepkgs(source=["pkg1"])
self.filenames_in(lines, "p1a p1b")
self.filenames_not_in(lines, "p2a p2b othera otherb osa osb")
- # Because source= was specified, we do search for unexecuted files.
+ # Because source= was specified, we do search for un-executed files.
assert lines['p1c'] == 0
def test_source_package_dotted_sub(self):
lines = self.coverage_usepkgs(source=["pkg1.sub"])
self.filenames_not_in(lines, "p2a p2b othera otherb osa osb")
- # Because source= was specified, we do search for unexecuted files.
+ # Because source= was specified, we do search for un-executed files.
assert lines['runmod3'] == 0
def test_source_package_dotted_p1b(self):
@@ -929,7 +929,7 @@ class SourceIncludeOmitTest(IncludeOmitTestsMixin, CoverageTest):
# https://github.com/nedbat/coveragepy/issues/218
# Used to be if you omitted something executed and inside the source,
# then after it was executed but not recorded, it would be found in
- # the search for unexecuted files, and given a score of 0%.
+ # the search for un-executed files, and given a score of 0%.
# The omit arg is by path, so need to be in the modules directory.
os.chdir("tests_dir_modules")
@@ -959,7 +959,7 @@ class SourceIncludeOmitTest(IncludeOmitTestsMixin, CoverageTest):
lines = self.coverage_usepkgs(source_pkgs=["pkg1"])
self.filenames_in(lines, "p1a p1b")
self.filenames_not_in(lines, "p2a p2b othera otherb osa osb ambiguous")
- # Because source= was specified, we do search for unexecuted files.
+ # Because source= was specified, we do search for un-executed files.
assert lines['p1c'] == 0
diff --git a/tests/test_html.py b/tests/test_html.py
index 6aea0626..b49cdabb 100644
--- a/tests/test_html.py
+++ b/tests/test_html.py
@@ -67,7 +67,7 @@ class HtmlTestHelpers(CoverageTest):
def get_html_index_content(self):
"""Return the content of index.html.
- Timestamps are replaced with a placeholder so that clocks don't matter.
+ Time stamps are replaced with a placeholder so that clocks don't matter.
"""
with open("htmlcov/index.html") as f:
@@ -85,17 +85,17 @@ class HtmlTestHelpers(CoverageTest):
return index
def assert_correct_timestamp(self, html):
- """Extract the timestamp from `html`, and assert it is recent."""
+ """Extract the time stamp from `html`, and assert it is recent."""
timestamp_pat = r"created at (\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2})"
m = re.search(timestamp_pat, html)
- assert m, "Didn't find a timestamp!"
+ assert m, "Didn't find a time stamp!"
timestamp = datetime.datetime(*map(int, m.groups()))
- # The timestamp only records the minute, so the delta could be from
+ # The time stamp only records the minute, so the delta could be from
# 12:00 to 12:01:59, or two minutes.
self.assert_recent_datetime(
timestamp,
seconds=120,
- msg=f"Timestamp is wrong: {timestamp}",
+ msg=f"Time stamp is wrong: {timestamp}",
)
def assert_valid_hrefs(self):
diff --git a/tests/test_phystokens.py b/tests/test_phystokens.py
index da37cead..dae1a0ed 100644
--- a/tests/test_phystokens.py
+++ b/tests/test_phystokens.py
@@ -32,7 +32,7 @@ SIMPLE_TOKENS = [
('ws', ' '), ('num', '2'), ('op', ')')],
]
-# Mixed-whitespace program, and its token stream.
+# Mixed-white-space program, and its token stream.
MIXED_WS = """\
def hello():
a="Hello world!"