Skip to content

Commit d10f231

Browse files
committed
Specify that content can either be singular nodes, as well as full trees
1 parent 61a07a7 commit d10f231

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

asyncPyGithub/Repository.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ async def get_repo_content(
506506
repo: str,
507507
path: str,
508508
mediatype: Literal["raw", "html", "object", "default"] = "default",
509-
) -> tuple[int, ContentTree | bytes | ErrorMessage]:
509+
) -> tuple[int, ContentTree | ContentNode | bytes | ErrorMessage]:
510510
"""
511511
Gets the contents of a file or directory in a repository. Specify the file path or directory with the path parameter. If you omit the path parameter, you will receive the contents of the repository's root directory.
512512
@@ -528,7 +528,7 @@ async def get_repo_content(
528528
mediatype (Literal["raw", "html", "object", "default"]): The media type of the content to return.
529529
530530
Returns:
531-
tuple[int, ContentTree | bytes | ErrorMessage]: A tuple containing the status code and the content tree, raw bytes, or an error message.
531+
tuple[int, ContentTree | ContentNode | bytes | ErrorMessage]: A tuple containing the status code and the content tree, raw bytes, or an error message.
532532
"""
533533
match mediatype:
534534
case "raw":

0 commit comments

Comments
 (0)