Fix type hint for get_pr_description method and clean up whitespace

This commit is contained in:
yuli.kamakura
2025-04-28 17:59:09 +08:00
parent cbe03b82fe
commit 4ad43c48e5

View File

@ -133,7 +133,7 @@ class GitProvider(ABC):
def reply_to_comment_from_comment_id(self, comment_id: int, body: str): def reply_to_comment_from_comment_id(self, comment_id: int, body: str):
pass pass
def get_pr_description(self, full: bool = True, split_changes_walkthrough=False) -> str or tuple: def get_pr_description(self, full: bool = True, split_changes_walkthrough=False) -> str | tuple:
from pr_agent.algo.utils import clip_tokens from pr_agent.algo.utils import clip_tokens
from pr_agent.config_loader import get_settings from pr_agent.config_loader import get_settings
max_tokens_description = get_settings().get("CONFIG.MAX_DESCRIPTION_TOKENS", None) max_tokens_description = get_settings().get("CONFIG.MAX_DESCRIPTION_TOKENS", None)
@ -285,7 +285,7 @@ class GitProvider(ABC):
def get_comment_url(self, comment) -> str: def get_comment_url(self, comment) -> str:
return "" return ""
def get_review_thread_comments(self, comment_id: int) -> list[dict]: def get_review_thread_comments(self, comment_id: int) -> list[dict]:
pass pass