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

Docstrings for constructors of repo.Repo and repo.MemoryRepo #1490

Merged
merged 4 commits into from
Feb 10, 2025
Merged
Changes from 3 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
9 changes: 9 additions & 0 deletions dulwich/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,14 @@ def __init__(
object_store: Optional[PackBasedObjectStore] = None,
bare: Optional[bool] = None,
) -> None:
"""Open a repository on disk.

Args:
root: Path to the repository's root.
object_store: ObjectStore to use; if omitted, we use the
repository's default object store
bare: True if this is a bare repository.
"""
hidden_path = os.path.join(root, CONTROLDIR)
if bare is None:
if os.path.isfile(hidden_path) or os.path.isdir(
Expand Down Expand Up @@ -1837,6 +1845,7 @@ class MemoryRepo(BaseRepo):
"""

def __init__(self) -> None:
"Create a new repository in memory."
jelmer marked this conversation as resolved.
Show resolved Hide resolved
from .config import ConfigFile

self._reflog: list[Any] = []
Expand Down
Loading