Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.
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
10 changes: 8 additions & 2 deletions mockfirestore/document.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from copy import deepcopy
from functools import reduce
import operator
from typing import List, Dict, Any
from typing import List, Dict, Any, Optional, Iterable
from mockfirestore import NotFound
from mockfirestore._helpers import (
Timestamp, Document, Store, get_by_path, set_by_path, delete_by_path
Expand Down Expand Up @@ -63,7 +63,13 @@ def __init__(self, data: Store, path: List[str],
def id(self):
return self._path[-1]

def get(self) -> DocumentSnapshot:
def get(
self,
field_paths: Optional[Iterable[str]] = None,
transaction: Any = None,
retry: Any = None,
timeout: Optional[float] = None,
) -> DocumentSnapshot:
return DocumentSnapshot(self, get_by_path(self._data, self._path))

def delete(self):
Expand Down