Skip to content

Commit 7d21d3e

Browse files
committed
PR feedback
Signed-off-by: Bernát Gábor <[email protected]>
1 parent 63e5726 commit 7d21d3e

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/tox/config/set_env.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,17 @@ def __init__( # noqa: C901, PLR0912
2424
from .loader.replacer import MatchExpression, find_replace_expr # noqa: PLC0415
2525

2626
if isinstance(raw, dict):
27-
# TOML 'file' attribute is to be handled separately later
28-
self._raw = dict(raw)
29-
if "file" in raw:
27+
self._raw = raw.copy()
28+
if "file" in raw: # environment files to be handled later
3029
self._env_files.append(raw["file"])
3130
self._raw.pop("file")
32-
3331
return
34-
3532
if isinstance(raw, list):
3633
self._raw = reduce(lambda a, b: {**a, **b}, raw)
3734
return
38-
3935
for line in raw.splitlines(): # noqa: PLR1702
4036
if line.strip():
41-
# INI 'file|' attribute is to be handled separately later
42-
if line.startswith("file|"):
37+
if line.startswith("file|"): # environment files to be handled later
4338
self._env_files.append(line[len("file|") :])
4439
else:
4540
try:

0 commit comments

Comments
 (0)