From b49b05fb9e4cb2af594b3453b5f28fe119e5beb7 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 13 Feb 2024 11:26:19 -0500 Subject: [PATCH] [DATALAD RUNCMD] run codespell throughout fixing typo automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- .pylintrc | 2 +- docs/source/internal/writing-documentation.rst | 2 +- docs/source/release-notes/2.1.0.rst | 2 +- src/flake8/main/application.py | 2 +- src/flake8/options/config.py | 2 +- tests/unit/test_options_config.py | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.pylintrc b/.pylintrc index 92ea2a4..1264a5f 100644 --- a/.pylintrc +++ b/.pylintrc @@ -54,7 +54,7 @@ confidence=INFERENCE_FAILURE # can either give multiple identifiers separated by comma (,) or put this # option multiple times (only on the command line, not in the configuration # file where it should appear only once).You can also use "--disable=all" to -# disable everything first and then reenable specific checks. For example, if +# disable everything first and then re-enable specific checks. For example, if # you want to run only the similarities checker, you can use "--disable=all # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use"--disable=all --enable=classes diff --git a/docs/source/internal/writing-documentation.rst b/docs/source/internal/writing-documentation.rst index ee37517..936ed23 100644 --- a/docs/source/internal/writing-documentation.rst +++ b/docs/source/internal/writing-documentation.rst @@ -116,7 +116,7 @@ Use the option template for new options All of |Flake8|'s command-line options are documented in the User Guide. Each option is documented individually using the ``.. option::`` directive provided by Sphinx. At the top of the document, in a reStructuredText comment, is a -template that should be copied and pasted into place when documening new +template that should be copied and pasted into place when documenting new options. .. note:: diff --git a/docs/source/release-notes/2.1.0.rst b/docs/source/release-notes/2.1.0.rst index c9e3c60..c4e9888 100644 --- a/docs/source/release-notes/2.1.0.rst +++ b/docs/source/release-notes/2.1.0.rst @@ -3,7 +3,7 @@ - Add FLAKE8_LAZY and FLAKE8_IGNORE environment variable support to git and mercurial hooks -- Force git and mercurial hooks to repsect configuration in setup.cfg +- Force git and mercurial hooks to respect configuration in setup.cfg - Only check staged files if that is specified - Fix hook file permissions - Fix the git hook on python 3 diff --git a/src/flake8/main/application.py b/src/flake8/main/application.py index b6bfae3..b654ce2 100644 --- a/src/flake8/main/application.py +++ b/src/flake8/main/application.py @@ -93,7 +93,7 @@ class Application: """Run the actual checks with the FileChecker Manager. This method encapsulates the logic to make a - :class:`~flake8.checker.Manger` instance run the checks it is + :class:`~flake8.checker.Manager` instance run the checks it is managing. """ assert self.file_checker_manager is not None diff --git a/src/flake8/options/config.py b/src/flake8/options/config.py index b51949c..27f4ddf 100644 --- a/src/flake8/options/config.py +++ b/src/flake8/options/config.py @@ -35,7 +35,7 @@ def _find_config_file(path: str) -> str | None: try: cfg.read(cfg_path, encoding="UTF-8") except (UnicodeDecodeError, configparser.ParsingError) as e: - LOG.warning("ignoring unparseable config %s: %s", cfg_path, e) + LOG.warning("ignoring unparsable config %s: %s", cfg_path, e) else: # only consider it a config if it contains flake8 sections if "flake8" in cfg or "flake8:local-plugins" in cfg: diff --git a/tests/unit/test_options_config.py b/tests/unit/test_options_config.py index 7de58f0..2ef9c52 100644 --- a/tests/unit/test_options_config.py +++ b/tests/unit/test_options_config.py @@ -32,7 +32,7 @@ def test_config_file_with_parse_error_is_not_considered(tmp_path, caplog): assert len(caplog.record_tuples) == 1 ((mod, level, msg),) = caplog.record_tuples assert (mod, level) == ("flake8.options.config", 30) - assert msg.startswith("ignoring unparseable config ") + assert msg.startswith("ignoring unparsable config ") def test_config_file_with_encoding_error_is_not_considered(tmp_path, caplog): @@ -43,7 +43,7 @@ def test_config_file_with_encoding_error_is_not_considered(tmp_path, caplog): assert len(caplog.record_tuples) == 1 ((mod, level, msg),) = caplog.record_tuples assert (mod, level) == ("flake8.options.config", 30) - assert msg.startswith("ignoring unparseable config ") + assert msg.startswith("ignoring unparsable config ") @pytest.mark.parametrize("cfg_name", ("setup.cfg", "tox.ini", ".flake8"))