Ruff: Multi-line docstring summary should start at the first line #62

Merged
Jmaa merged 2 commits from jmaa/issue-51-ruff-multiline-docstring-summary-should-start-at-the-first-line into main 2025-04-14 21:47:24 +00:00
Showing only changes of commit 9fb74ee51b - Show all commits

View File

@ -82,14 +82,14 @@ logger = logging.getLogger(__name__)
def generate_branch_name(issue_number: str, issue_title: str) -> str:
"""Create a branch name by sanitizing the issue title.
Non-alphanumeric characters (except spaces) are removed,
the text is lowercased, and spaces are replaced with dashes.
Args:
issue_number: The issue number to include in the branch name.
issue_title: The issue title to sanitize and include in the branch name.
Returns:
A sanitized branch name combining the issue number and title.
"""
@ -137,7 +137,7 @@ For code tasks:
"""
# MODEL = 'ollama/gemma3:27b'
#MODEL = 'ollama_chat/gemma3:27b'
# MODEL = 'ollama_chat/gemma3:27b'
def create_aider_command(issue: str) -> list[str]:
@ -148,7 +148,7 @@ def create_aider_command(issue: str) -> list[str]:
'--cache-prompts',
'--no-stream',
#'--model',
#MODEL,
# MODEL,
'--test-cmd',
AIDER_TEST,
'--lint-cmd',
@ -156,7 +156,7 @@ def create_aider_command(issue: str) -> list[str]:
'--auto-test',
'--no-auto-lint',
'--api-key',
secrets.llm_api_key(),
secrets.llm_api_key(),
'--read',
'CONVENTIONS.md',
'--message',
@ -195,12 +195,12 @@ def push_changes(
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.
Args:
cwd: The current working directory (repository path).
base_branch: The name of the base branch to compare against.
current_branch: The name of the current branch to check for commits.
Returns:
True if there are commits on the current branch not in the base branch, False otherwise.
"""
@ -220,12 +220,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:
"""Run a shell command and return its success status.
Args:
cmd: The command to run as a list of strings.
cwd: The directory to run the command in.
check: Whether to raise an exception if the command fails.
Returns:
True if the command succeeded, False otherwise.
"""
@ -279,7 +279,7 @@ def solve_issue_in_repository(
def handle_issues(args, client, seen_issues_db):
"""Process all open issues with the 'aider' label.
Args:
args: Command line arguments.
client: The Gitea client instance.