Fix ResourceWarning for unclosed files in test_cookiecutter_generation.py

Co-authored-by: MauGx3 <225707+MauGx3@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-07 00:24:41 +00:00 committed by Maurício Gioachini
parent a096ba51ac
commit d57c75d9ec

View File

@ -168,7 +168,8 @@ def check_paths(paths: Iterable[Path]):
if is_binary(str(path)): if is_binary(str(path)):
continue continue
for line in path.open(): with path.open() as file:
for line in file:
match = RE_OBJ.search(line) match = RE_OBJ.search(line)
assert match is None, f"cookiecutter variable not replaced in {path}" assert match is None, f"cookiecutter variable not replaced in {path}"