Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

ruff: Fix FURB129 iterate over file object directly.

Anders Kaseorg7b69c93c50ec
diff --git a/tools/lib/provision_inner.py b/tools/lib/provision_inner.py
index a4aa1d417fb..09f513e25a5 100755
--- a/tools/lib/provision_inner.py
+++ b/tools/lib/provision_inner.py
@@ -98,7 +98,7 @@ def setup_shell_profile(shell_profile: str) -> None:
def write_command(command: str) -> None:
if os.path.exists(shell_profile_path):
with open(shell_profile_path) as shell_profile_file:
- lines = [line.strip() for line in shell_profile_file.readlines()]
+ lines = [line.strip() for line in shell_profile_file]
if command not in lines:
with open(shell_profile_path, "a+") as shell_profile_file:
shell_profile_file.writelines(command + "\n")