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: 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.
""" """
@ -137,7 +137,7 @@ For code tasks:
""" """
# MODEL = 'ollama/gemma3:27b' # MODEL = 'ollama/gemma3:27b'
#MODEL = 'ollama_chat/gemma3:27b' # MODEL = 'ollama_chat/gemma3:27b'
def create_aider_command(issue: str) -> list[str]: def create_aider_command(issue: str) -> list[str]:
@ -148,7 +148,7 @@ def create_aider_command(issue: str) -> list[str]:
'--cache-prompts', '--cache-prompts',
'--no-stream', '--no-stream',
#'--model', #'--model',
#MODEL, # MODEL,
'--test-cmd', '--test-cmd',
AIDER_TEST, AIDER_TEST,
'--lint-cmd', '--lint-cmd',
@ -156,7 +156,7 @@ def create_aider_command(issue: str) -> list[str]:
'--auto-test', '--auto-test',
'--no-auto-lint', '--no-auto-lint',
'--api-key', '--api-key',
secrets.llm_api_key(), secrets.llm_api_key(),
'--read', '--read',
'CONVENTIONS.md', 'CONVENTIONS.md',
'--message', '--message',
@ -195,12 +195,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.
""" """
@ -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: 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.
""" """
@ -279,7 +279,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.