From b5aa4b22acdb9a3ff4c892f64c2ca441852bb7f2 Mon Sep 17 00:00:00 2001 From: "bobo.yang" Date: Fri, 7 Mar 2025 11:00:41 +0800 Subject: [PATCH] style: Improve console output formatting in push_changes - Add newlines after push status messages for better readability - Ensure consistent formatting for success and error messages - Update output formatting in git push operations --- merico/github/commit/commit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/merico/github/commit/commit.py b/merico/github/commit/commit.py index fc5dd90..ec3148f 100644 --- a/merico/github/commit/commit.py +++ b/merico/github/commit/commit.py @@ -388,12 +388,12 @@ def push_changes(): print("Could not determine current branch. Push failed.", file=sys.stderr, flush=True) return False - print(f"Pushing changes to origin/{current_branch}...", flush=True) + print(f"Pushing changes to origin/{current_branch}...", end="\n\n", flush=True) result = subprocess_check_output(["git", "push", "origin", current_branch]) - print("Push completed successfully.", flush=True) + print("Push completed successfully.", end="\n\n", flush=True) return True except subprocess.CalledProcessError as e: - print(f"Push failed: {str(e)}", file=sys.stderr, flush=True) + print(f"Push failed: {str(e)}", end="\n\n", file=sys.stderr, flush=True) return False def main():