mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
ruff: Fix FURB129 iterate over file object directly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
5af8dfda3e
commit
7b69c93c50
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user