Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type of conflicting_files of DiscussionWDetails #1847

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/huggingface_hub/community.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""
from dataclasses import dataclass
from datetime import datetime
from typing import List, Literal, Optional
from typing import List, Literal, Optional, Union

from .constants import REPO_TYPE_MODEL
from .utils import parse_datetime
Expand Down Expand Up @@ -115,9 +115,10 @@ class DiscussionWithDetails(Discussion):
The `datetime` of creation of the Discussion / Pull Request.
events (`list` of [`DiscussionEvent`])
The list of [`DiscussionEvents`] in this Discussion or Pull Request.
conflicting_files (`list` of `str`, *optional*):
conflicting_files (`Union[List[str], bool, None]`, *optional*):
A list of conflicting files if this is a Pull Request.
`None` if `self.is_pull_request` is `False`.
`True` if there are conflicting files but the list can't be retrieved.
target_branch (`str`, *optional*):
The branch into which changes are to be merged if this is a
Pull Request . `None` if `self.is_pull_request` is `False`.
Expand All @@ -135,7 +136,7 @@ class DiscussionWithDetails(Discussion):
"""

events: List["DiscussionEvent"]
conflicting_files: Optional[List[str]]
conflicting_files: Union[List[str], bool, None]
target_branch: Optional[str]
merge_commit_oid: Optional[str]
diff: Optional[str]
Expand Down
Loading