Skip to content

Commit

Permalink
Use a better variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Sep 25, 2024
1 parent 2ee8908 commit 3ef0323
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/eachdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,15 +567,15 @@ def update_version_files(targets, version, packages):
["tool"]["hatch"]["version"]["path"]
)

with open(version_file_path) as _file:
text = _file.read()
with open(version_file_path) as file:
text = file.read()

if replace in text:
print(f"{version_file_path} already contains {replace}")
continue

with open(version_file_path, "w", encoding="utf-8") as _file:
_file.write(re.sub(search, replace, text))
with open(version_file_path, "w", encoding="utf-8") as file:
file.write(re.sub(search, replace, text))


def update_dependencies(targets, version, packages):
Expand Down

0 comments on commit 3ef0323

Please sign in to comment.