fixed slight issue with naming of variables

This commit is contained in:
Karma Riuk
2025-03-31 15:29:43 +02:00
parent 941e0cb19f
commit abc642d969

View File

@ -184,16 +184,16 @@ def get_files(pr: PullRequest, repo: Repository, repo_path: str) -> dict[str, Fi
def get_comments(pr: PullRequest) -> list[Comment]: def get_comments(pr: PullRequest) -> list[Comment]:
ret = [] ret = []
for comment in pr.get_review_comments(): for comment in pr.get_review_comments():
comment = Comment( comment_to_add = Comment(
body=comment.body, body=comment.body,
file=comment.path, file=comment.path,
from_=comment.start_line if comment.start_line else comment.line, from_=comment.start_line if comment.start_line else comment.line,
to=comment.line, to=comment.line,
) )
if comment.from_ is None or comment.to is None: if comment_to_add.from_ is None or comment_to_add.to is None:
comment.to = comment.original_line comment_to_add.to = comment.original_line
comment.from_ = comment.original_start_line comment_to_add.from_ = comment.original_start_line
ret.append(comment) ret.append(comment_to_add)
return ret return ret