mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 21:16:54 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
c609b69914
commit
a20ce903c7
3 changed files with 15 additions and 4 deletions
|
|
@ -8,6 +8,7 @@ from typing import Optional
|
|||
from typing import Tuple
|
||||
|
||||
import toml
|
||||
|
||||
from flake8 import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -53,7 +54,10 @@ class ConfigFileFinder:
|
|||
|
||||
# List of filenames to find in the local/project directory
|
||||
self.project_filenames = (
|
||||
"pyproject.toml", "setup.cfg", "tox.ini", f".{program_name}",
|
||||
"pyproject.toml",
|
||||
"setup.cfg",
|
||||
"tox.ini",
|
||||
f".{program_name}",
|
||||
)
|
||||
|
||||
self.local_directory = os.path.abspath(os.curdir)
|
||||
|
|
|
|||
|
|
@ -10,8 +10,12 @@ from flake8.options import config
|
|||
CLI_SPECIFIED_FILEPATH = "tests/fixtures/config_files/cli-specified.ini"
|
||||
BROKEN_CONFIG_PATH = "tests/fixtures/config_files/broken.ini"
|
||||
|
||||
CLI_SPECIFIED_PYPROJECT_CONFIG_PATH = "tests/fixtures/config_files/cli-specified-pyproject.toml" # noqa: E501
|
||||
BROKEN_PYPROJECT_CONFIG_PATH = "tests/fixtures/config_files/broken-pyproject.toml" # noqa: E501
|
||||
CLI_SPECIFIED_PYPROJECT_CONFIG_PATH = (
|
||||
"tests/fixtures/config_files/cli-specified-pyproject.toml" # noqa: E501
|
||||
)
|
||||
BROKEN_PYPROJECT_CONFIG_PATH = (
|
||||
"tests/fixtures/config_files/broken-pyproject.toml" # noqa: E501
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
|
|||
|
|
@ -54,7 +54,10 @@ def test_parse_cli_config(optmanager, config_finder):
|
|||
[
|
||||
("tests/fixtures/config_files/cli-specified.ini", True),
|
||||
("tests/fixtures/config_files/no-flake8-section.ini", False),
|
||||
("tests/fixtures/config_files/no-flake8-section-pyproject.toml", False), # noqa: E501
|
||||
(
|
||||
"tests/fixtures/config_files/no-flake8-section-pyproject.toml",
|
||||
False,
|
||||
), # noqa: E501
|
||||
],
|
||||
)
|
||||
def test_is_configured_by(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue