Fixed comment 2

This commit is contained in:
César Pérez
2025-06-07 21:06:12 +02:00
parent 04cb8af65d
commit a550c17466

View File

@ -112,8 +112,10 @@ class GitLabProvider(GitProvider):
get_logger().error(f"Could not get diff for merge request {self.id_mr}") get_logger().error(f"Could not get diff for merge request {self.id_mr}")
raise DiffNotFoundError(f"Could not get diff for merge request {self.id_mr}") from e raise DiffNotFoundError(f"Could not get diff for merge request {self.id_mr}") from e
def _ensure_string_content(self, content: Union[str, bytes]) -> str: def _ensure_string_content(self, content: Union[str, bytes, None]) -> str:
"""Convert bytes content to UTF-8 string if needed.""" """Convert bytes content to UTF-8 string if needed."""
if content is None:
return ""
if isinstance(content, bytes): if isinstance(content, bytes):
return content.decode('utf-8') return content.decode('utf-8')
return content return content