mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-19 18:10:00 +00:00
changed additional candidates to lists to become more mutable
This commit is contained in:
parent
54d81ee27d
commit
69497e3b73
3 changed files with 8 additions and 8 deletions
|
|
@ -11,12 +11,12 @@ from typing import Tuple
|
||||||
from flake8.options.manager import OptionManager
|
from flake8.options.manager import OptionManager
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
DEFAULT_CANDIDATES = ("setup.cfg", "tox.ini", ".flake8")
|
DEFAULT_CANDIDATES = ["setup.cfg", "tox.ini", ".flake8"]
|
||||||
ADDITIONAL_CANDIDATES = ("flake8",)
|
ADDITIONAL_CANDIDATES = ["flake8"]
|
||||||
ADDITIONAL_LOCATIONS = (
|
ADDITIONAL_LOCATIONS = [
|
||||||
os.path.expanduser(r"~"),
|
os.path.expanduser(r"~"),
|
||||||
os.path.expanduser(r"~/.config"),
|
os.path.expanduser(r"~/.config"),
|
||||||
)
|
]
|
||||||
|
|
||||||
|
|
||||||
def _is_config(path: str) -> bool:
|
def _is_config(path: str) -> bool:
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ from flake8 import utils
|
||||||
from flake8.main import cli
|
from flake8.main import cli
|
||||||
from flake8.options import config
|
from flake8.options import config
|
||||||
|
|
||||||
config.ADDITIONAL_LOCATIONS = ()
|
config.ADDITIONAL_LOCATIONS = []
|
||||||
config.ADDITIONAL_CANDIDATES = ()
|
config.ADDITIONAL_CANDIDATES = []
|
||||||
|
|
||||||
|
|
||||||
def test_diff_option(tmpdir, capsys):
|
def test_diff_option(tmpdir, capsys):
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ from flake8.options.manager import OptionManager
|
||||||
|
|
||||||
|
|
||||||
def test_config_not_found_returns_none(tmp_path):
|
def test_config_not_found_returns_none(tmp_path):
|
||||||
config.ADDITIONAL_LOCATIONS = ()
|
config.ADDITIONAL_LOCATIONS = []
|
||||||
config.ADDITIONAL_CANDIDATES = ()
|
config.ADDITIONAL_CANDIDATES = []
|
||||||
assert config._find_config_file(str(tmp_path)) is None
|
assert config._find_config_file(str(tmp_path)) is None
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue