mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-09-20 10:52:34 +03:00
Merge pull request #3 from MauGx3/copilot/fix-8017745e-5c3a-4e19-b9d7-4720fa4d4ca5
Fix ResourceWarning for unclosed files in test suite
This commit is contained in:
commit
4601d175d8
|
@ -168,7 +168,8 @@ def check_paths(paths: Iterable[Path]):
|
|||
if is_binary(str(path)):
|
||||
continue
|
||||
|
||||
for line in path.open():
|
||||
with path.open() as file:
|
||||
for line in file:
|
||||
match = RE_OBJ.search(line)
|
||||
assert match is None, f"cookiecutter variable not replaced in {path}"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user