Skip to content

Commit 3d7c1ff

Browse files
committed
RDBC-809 Annotate object_type as optional
1 parent d60d944 commit 3d7c1ff

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

ravendb/documents/session/cluster_transaction_operation.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ def lazily(self) -> ILazyClusterTransactionOperations:
5050
pass
5151

5252
@abc.abstractmethod
53-
def get_compare_exchange_value(self, key: str, object_type: Type[_T] = None) -> Optional[CompareExchangeValue[_T]]:
53+
def get_compare_exchange_value(
54+
self, key: str, object_type: Optional[Type[_T]] = None
55+
) -> Optional[CompareExchangeValue[_T]]:
5456
pass
5557

5658
@abc.abstractmethod
5759
def get_compare_exchange_values(
58-
self, keys: List[str], object_type: Type[_T] = None
60+
self, keys: List[str], object_type: Optional[Type[_T]] = None
5961
) -> Dict[str, CompareExchangeValue[_T]]:
6062
pass
6163

@@ -289,11 +291,13 @@ def __init__(self, session: "DocumentSession"):
289291
def lazily(self) -> ILazyClusterTransactionOperations:
290292
return LazyClusterTransactionOperations(self.session)
291293

292-
def get_compare_exchange_value(self, key: str, object_type: Type[_T] = None) -> Optional[CompareExchangeValue[_T]]:
294+
def get_compare_exchange_value(
295+
self, key: str, object_type: Optional[Type[_T]] = None
296+
) -> Optional[CompareExchangeValue[_T]]:
293297
return self._get_compare_exchange_value_internal(key, object_type)
294298

295299
def get_compare_exchange_values(
296-
self, keys: List[str], object_type: Type[_T] = None
300+
self, keys: List[str], object_type: Optional[Type[_T]] = None
297301
) -> Dict[str, CompareExchangeValue[_T]]:
298302
return super()._get_compare_exchange_values_internal(keys, object_type)
299303

0 commit comments

Comments
 (0)