Ruff
This commit is contained in:
parent
1593526d22
commit
3b4e40b2f1
|
@ -82,14 +82,14 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
def generate_branch_name(issue_number: str, issue_title: str) -> str:
|
def generate_branch_name(issue_number: str, issue_title: str) -> str:
|
||||||
"""Create a branch name by sanitizing the issue title.
|
"""Create a branch name by sanitizing the issue title.
|
||||||
|
|
||||||
Non-alphanumeric characters (except spaces) are removed,
|
Non-alphanumeric characters (except spaces) are removed,
|
||||||
the text is lowercased, and spaces are replaced with dashes.
|
the text is lowercased, and spaces are replaced with dashes.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
issue_number: The issue number to include in the branch name.
|
issue_number: The issue number to include in the branch name.
|
||||||
issue_title: The issue title to sanitize and include in the branch name.
|
issue_title: The issue title to sanitize and include in the branch name.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
A sanitized branch name combining the issue number and title.
|
A sanitized branch name combining the issue number and title.
|
||||||
"""
|
"""
|
||||||
|
@ -196,12 +196,12 @@ def push_changes(
|
||||||
|
|
||||||
def has_commits_on_branch(cwd: Path, base_branch: str, current_branch: str) -> bool:
|
def has_commits_on_branch(cwd: Path, base_branch: str, current_branch: str) -> bool:
|
||||||
"""Check if there are any commits on the current branch that aren't in the base branch.
|
"""Check if there are any commits on the current branch that aren't in the base branch.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
cwd: The current working directory (repository path).
|
cwd: The current working directory (repository path).
|
||||||
base_branch: The name of the base branch to compare against.
|
base_branch: The name of the base branch to compare against.
|
||||||
current_branch: The name of the current branch to check for commits.
|
current_branch: The name of the current branch to check for commits.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
True if there are commits on the current branch not in the base branch, False otherwise.
|
True if there are commits on the current branch not in the base branch, False otherwise.
|
||||||
"""
|
"""
|
||||||
|
@ -221,12 +221,12 @@ def has_commits_on_branch(cwd: Path, base_branch: str, current_branch: str) -> b
|
||||||
|
|
||||||
def run_cmd(cmd: list[str], cwd: Path | None = None, check=True) -> bool:
|
def run_cmd(cmd: list[str], cwd: Path | None = None, check=True) -> bool:
|
||||||
"""Run a shell command and return its success status.
|
"""Run a shell command and return its success status.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
cmd: The command to run as a list of strings.
|
cmd: The command to run as a list of strings.
|
||||||
cwd: The directory to run the command in.
|
cwd: The directory to run the command in.
|
||||||
check: Whether to raise an exception if the command fails.
|
check: Whether to raise an exception if the command fails.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
True if the command succeeded, False otherwise.
|
True if the command succeeded, False otherwise.
|
||||||
"""
|
"""
|
||||||
|
@ -280,7 +280,7 @@ def solve_issue_in_repository(
|
||||||
|
|
||||||
def handle_issues(args, client, seen_issues_db):
|
def handle_issues(args, client, seen_issues_db):
|
||||||
"""Process all open issues with the 'aider' label.
|
"""Process all open issues with the 'aider' label.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
args: Command line arguments.
|
args: Command line arguments.
|
||||||
client: The Gitea client instance.
|
client: The Gitea client instance.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user