mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-11 15:24:18 +00:00
[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 ^^^
This commit is contained in:
parent
83ffa6ebed
commit
b49b05fb9e
6 changed files with 7 additions and 7 deletions
|
|
@ -54,7 +54,7 @@ confidence=INFERENCE_FAILURE
|
||||||
# can either give multiple identifiers separated by comma (,) or put this
|
# can either give multiple identifiers separated by comma (,) or put this
|
||||||
# option multiple times (only on the command line, not in the configuration
|
# 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
|
# 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
|
# 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
|
# --enable=similarities". If you want to run only the classes checker, but have
|
||||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
# no Warning level messages displayed, use"--disable=all --enable=classes
|
||||||
|
|
|
||||||
|
|
@ -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
|
All of |Flake8|'s command-line options are documented in the User Guide. Each
|
||||||
option is documented individually using the ``.. option::`` directive provided
|
option is documented individually using the ``.. option::`` directive provided
|
||||||
by Sphinx. At the top of the document, in a reStructuredText comment, is a
|
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.
|
options.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
- Add FLAKE8_LAZY and FLAKE8_IGNORE environment variable support to git and
|
- Add FLAKE8_LAZY and FLAKE8_IGNORE environment variable support to git and
|
||||||
mercurial hooks
|
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
|
- Only check staged files if that is specified
|
||||||
- Fix hook file permissions
|
- Fix hook file permissions
|
||||||
- Fix the git hook on python 3
|
- Fix the git hook on python 3
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ class Application:
|
||||||
"""Run the actual checks with the FileChecker Manager.
|
"""Run the actual checks with the FileChecker Manager.
|
||||||
|
|
||||||
This method encapsulates the logic to make a
|
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.
|
managing.
|
||||||
"""
|
"""
|
||||||
assert self.file_checker_manager is not None
|
assert self.file_checker_manager is not None
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ def _find_config_file(path: str) -> str | None:
|
||||||
try:
|
try:
|
||||||
cfg.read(cfg_path, encoding="UTF-8")
|
cfg.read(cfg_path, encoding="UTF-8")
|
||||||
except (UnicodeDecodeError, configparser.ParsingError) as e:
|
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:
|
else:
|
||||||
# only consider it a config if it contains flake8 sections
|
# only consider it a config if it contains flake8 sections
|
||||||
if "flake8" in cfg or "flake8:local-plugins" in cfg:
|
if "flake8" in cfg or "flake8:local-plugins" in cfg:
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ def test_config_file_with_parse_error_is_not_considered(tmp_path, caplog):
|
||||||
assert len(caplog.record_tuples) == 1
|
assert len(caplog.record_tuples) == 1
|
||||||
((mod, level, msg),) = caplog.record_tuples
|
((mod, level, msg),) = caplog.record_tuples
|
||||||
assert (mod, level) == ("flake8.options.config", 30)
|
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):
|
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
|
assert len(caplog.record_tuples) == 1
|
||||||
((mod, level, msg),) = caplog.record_tuples
|
((mod, level, msg),) = caplog.record_tuples
|
||||||
assert (mod, level) == ("flake8.options.config", 30)
|
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"))
|
@pytest.mark.parametrize("cfg_name", ("setup.cfg", "tox.ini", ".flake8"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue