refactor path reading

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
This commit is contained in:
Maurício Gioachini 2025-09-07 20:51:51 -03:00 committed by GitHub
parent d57c75d9ec
commit 083c698196
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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