Skip to content

Commit a5f4f7a

Browse files
Merge branch 'main' into dependabot/github_actions/fossas/fossa-action-1.7.0
2 parents 997538e + 80ac43a commit a5f4f7a

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

dapr/actor/runtime/_reminder_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(
3636
reminder_name: str,
3737
state: Optional[bytes],
3838
due_time: timedelta,
39-
period: timedelta,
39+
period: Optional[timedelta] = None,
4040
ttl: Optional[timedelta] = None,
4141
):
4242
"""Creates new :class:`ActorReminderData` instance.
@@ -77,7 +77,7 @@ def due_time(self) -> timedelta:
7777
return self._due_time
7878

7979
@property
80-
def period(self) -> timedelta:
80+
def period(self) -> Optional[timedelta]:
8181
"""Gets period of Actor Reminder."""
8282
return self._period
8383

dapr/actor/runtime/actor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ async def register_reminder(
112112
name: str,
113113
state: bytes,
114114
due_time: timedelta,
115-
period: timedelta,
115+
period: Optional[timedelta] = None,
116116
ttl: Optional[timedelta] = None,
117117
) -> None:
118118
"""Registers actor reminder.

dapr/actor/runtime/mock_actor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ async def register_reminder(
8686
name: str,
8787
state: bytes,
8888
due_time: timedelta,
89-
period: timedelta,
89+
period: Optional[timedelta] = None,
9090
ttl: Optional[timedelta] = None,
9191
) -> None:
9292
"""Adds actor reminder to self._state_manager._mock_reminders.

dapr/actor/runtime/state_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def ttl_in_seconds(self) -> Optional[int]:
5656
return self._ttl_in_seconds
5757

5858
@ttl_in_seconds.setter
59-
def ttl_in_seconds(self, new_ttl_in_seconds: int) -> None:
59+
def ttl_in_seconds(self, new_ttl_in_seconds: Optional[int]) -> None:
6060
self._ttl_in_seconds = new_ttl_in_seconds
6161

6262

dapr/clients/grpc/_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def __init__(
109109
super(InvokeMethodRequest, self).__init__(())
110110

111111
self._content_type = content_type
112-
self._http_verb = None
112+
self._http_verb: Optional[str] = None
113113
self._http_querystring: Dict[str, str] = {}
114114

115115
self.set_data(data)
@@ -127,7 +127,7 @@ def http_verb(self) -> Optional[str]:
127127
@http_verb.setter
128128
def http_verb(self, val: Optional[str]) -> None:
129129
"""Sets HTTP method to Dapr invocation request."""
130-
if val not in self.HTTP_METHODS:
130+
if val is not None and val not in self.HTTP_METHODS:
131131
raise ValueError(f'{val} is the invalid HTTP verb.')
132132
self._http_verb = val
133133

0 commit comments

Comments
 (0)