diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2022-11-11 05:39:41 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-11-11 05:39:41 -0500 |
commit | 1ac1846fdf837fac1c958dfde0ebce3e9531bf87 (patch) | |
tree | 1c8353458c7ae3b375ee20d2968eb597877f5e45 | |
parent | 2f0d4845ef39c17389aacc014693727265057817 (diff) | |
download | python-coveragepy-git-1ac1846fdf837fac1c958dfde0ebce3e9531bf87.tar.gz |
feat: complete removal of `[run] note`
-rw-r--r-- | CHANGES.rst | 2 | ||||
-rw-r--r-- | coverage/config.py | 2 | ||||
-rw-r--r-- | coverage/control.py | 3 | ||||
-rw-r--r-- | doc/config.rst | 8 | ||||
-rw-r--r-- | tests/test_config.py | 11 |
5 files changed, 2 insertions, 24 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 96926021..51eb949d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -43,6 +43,8 @@ Unreleased - Fixed a mis-measurement of a strange use of wildcard alternatives in match/case statements, closing `issue 1421`_. +- The ``[run] note`` setting has been completely removed. + .. _pull 1479: https://github.com/nedbat/coveragepy/pull/1479 .. _issue 1418: https://github.com/nedbat/coveragepy/issues/1418 .. _issue 1421: https://github.com/nedbat/coveragepy/issues/1421 diff --git a/coverage/config.py b/coverage/config.py index 309f65e8..7b765edf 100644 --- a/coverage/config.py +++ b/coverage/config.py @@ -184,7 +184,6 @@ class CoverageConfig: self.debug = [] self.disable_warnings = [] self.dynamic_context = None - self.note = None self.parallel = False self.plugins = [] self.relative_files = False @@ -360,7 +359,6 @@ class CoverageConfig: ('debug', 'run:debug', 'list'), ('disable_warnings', 'run:disable_warnings', 'list'), ('dynamic_context', 'run:dynamic_context'), - ('note', 'run:note'), ('parallel', 'run:parallel', 'boolean'), ('plugins', 'run:plugins', 'list'), ('relative_files', 'run:relative_files', 'boolean'), diff --git a/coverage/control.py b/coverage/control.py index 9a55acb1..91ad5a78 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -808,9 +808,6 @@ class Coverage: for plugin_name, paths in file_paths.items(): self._data.touch_files(paths, plugin_name) - if self.config.note: - self._warn("The '[run] note' setting is no longer supported.") - # Backward compatibility with version 1. def analysis(self, morf): """Like `analysis2` but doesn't return excluded line numbers.""" diff --git a/doc/config.rst b/doc/config.rst index c6f6442a..83f64a4d 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -222,14 +222,6 @@ measurement or reporting. Ignored if ``source`` is set. See :ref:`source` for details. -.. _config_run_note: - -[run] note -.......... - -(string) This is now obsolete. - - .. _config_run_omit: [run] omit diff --git a/tests/test_config.py b/tests/test_config.py index 4afdd1e3..444719fd 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -706,17 +706,6 @@ class ConfigFileTest(UsingModulesMixin, CoverageTest): assert not cov.config.branch assert cov.config.data_file == ".coverage" - def test_note_is_obsolete(self): - self.make_file("main.py", "a = 1") - self.make_file(".coveragerc", """\ - [run] - note = I am here I am here I am here! - """) - cov = coverage.Coverage() - with self.assert_warnings(cov, [r"The '\[run] note' setting is no longer supported."]): - self.start_import_stop(cov, "main") - cov.report() - def test_no_toml_installed_no_toml(self): # Can't read a toml file that doesn't exist. with without_module(coverage.tomlconfig, 'tomllib'): |