style: Apply linter formatting to versionbump.py script

This commit is contained in:
Paul Gauthier (aider) 2025-03-04 13:57:07 -08:00
parent ee4508af03
commit 50bead172b

View file

@ -22,9 +22,7 @@ def check_branch():
# Function to check if the working directory is clean # Function to check if the working directory is clean
def check_working_directory_clean(): def check_working_directory_clean():
status = subprocess.run( status = subprocess.run(["git", "status", "--porcelain"], capture_output=True, text=True).stdout
["git", "status", "--porcelain"], capture_output=True, text=True
).stdout
if status: if status:
print("Error: Working directory is not clean.") print("Error: Working directory is not clean.")
sys.exit(1) sys.exit(1)
@ -68,9 +66,7 @@ def check_main_branch_up_to_date():
# Function to check if we can push to the origin repository # Function to check if we can push to the origin repository
def check_push_access(): def check_push_access():
print("Checking push access to origin repository...") print("Checking push access to origin repository...")
result = subprocess.run( result = subprocess.run(["git", "push", "--dry-run", "origin"], capture_output=True, text=True)
["git", "push", "--dry-run", "origin"], capture_output=True, text=True
)
if result.returncode != 0: if result.returncode != 0:
print("Error: Cannot push to origin repository.") print("Error: Cannot push to origin repository.")
print(result.stderr) print(result.stderr)