Skip to content

Commit 5d561ff

Browse files
committed
chore: rename ignored_file to ignored_config_file
1 parent 6772195 commit 5d561ff

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/_pytest/config/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,15 +1242,15 @@ def _initini(self, args: Sequence[str]) -> None:
12421242
ns, unknown_args = self._parser.parse_known_and_unknown_args(
12431243
args, namespace=copy.copy(self.option)
12441244
)
1245-
rootpath, inipath, inicfg, ignored_files = determine_setup(
1245+
rootpath, inipath, inicfg, ignored_config_files = determine_setup(
12461246
inifile=ns.inifilename,
12471247
args=ns.file_or_dir + unknown_args,
12481248
rootdir_cmd_arg=ns.rootdir or None,
12491249
invocation_dir=self.invocation_params.dir,
12501250
)
12511251
self._rootpath = rootpath
12521252
self._inipath = inipath
1253-
self._ignored_files = ignored_files
1253+
self._ignored_config_files = ignored_config_files
12541254
self.inicfg = inicfg
12551255
self._parser.extra_info["rootdir"] = str(self.rootpath)
12561256
self._parser.extra_info["inifile"] = str(self.inipath)

src/_pytest/config/findpaths.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def locate_config(
105105
if not args:
106106
args = [invocation_dir]
107107
found_pyproject_toml: Path | None = None
108-
ignored_files: list[str] = []
108+
ignored_config_files: list[str] = []
109109

110110
for arg in args:
111111
argpath = absolutepath(arg)
@@ -123,8 +123,8 @@ def locate_config(
123123
p2 = base / remainder
124124
if p2.is_file():
125125
if load_config_dict_from_file(p2) is not None:
126-
ignored_files.append(remainder)
127-
return base, p, ini_config, ignored_files
126+
ignored_config_files.append(remainder)
127+
return base, p, ini_config, ignored_config_files
128128
if found_pyproject_toml is not None:
129129
return found_pyproject_toml.parent, found_pyproject_toml, {}, []
130130
return None, None, {}, []
@@ -202,7 +202,7 @@ def determine_setup(
202202
"""
203203
rootdir = None
204204
dirs = get_dirs_from_args(args)
205-
ignored_files: list[str] = []
205+
ignored_config_files: list[str] = []
206206

207207
if inifile:
208208
inipath_ = absolutepath(inifile)
@@ -212,7 +212,7 @@ def determine_setup(
212212
rootdir = inipath_.parent
213213
else:
214214
ancestor = get_common_ancestor(invocation_dir, dirs)
215-
rootdir, inipath, inicfg, ignored_files = locate_config(
215+
rootdir, inipath, inicfg, ignored_config_files = locate_config(
216216
invocation_dir, [ancestor]
217217
)
218218
if rootdir is None and rootdir_cmd_arg is None:
@@ -236,7 +236,7 @@ def determine_setup(
236236
f"Directory '{rootdir}' not found. Check your '--rootdir' option."
237237
)
238238
assert rootdir is not None
239-
return rootdir, inipath, inicfg or {}, ignored_files
239+
return rootdir, inipath, inicfg or {}, ignored_config_files
240240

241241

242242
def is_fs_root(p: Path) -> bool:

src/_pytest/terminal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,8 +880,8 @@ def pytest_report_header(self, config: Config) -> list[str]:
880880

881881
if config.inipath:
882882
warning = ""
883-
if config._ignored_files:
884-
warning = f" (WARNING: ignoring pytest config in {', '.join(config._ignored_files)}!)"
883+
if config._ignored_config_files:
884+
warning = f" (WARNING: ignoring pytest config in {', '.join(config._ignored_config_files)}!)"
885885
result.append(
886886
"configfile: " + bestrelpath(config.rootpath, config.inipath) + warning
887887
)

0 commit comments

Comments
 (0)