Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions dapr/actor/runtime/_reminder_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(
reminder_name: str,
state: Optional[bytes],
due_time: timedelta,
period: timedelta,
period: Optional[timedelta] = None,
ttl: Optional[timedelta] = None,
):
"""Creates new :class:`ActorReminderData` instance.
Expand Down Expand Up @@ -77,7 +77,7 @@ def due_time(self) -> timedelta:
return self._due_time

@property
def period(self) -> timedelta:
def period(self) -> Optional[timedelta]:
"""Gets period of Actor Reminder."""
return self._period

Expand Down
2 changes: 1 addition & 1 deletion dapr/actor/runtime/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async def register_reminder(
name: str,
state: bytes,
due_time: timedelta,
period: timedelta,
period: Optional[timedelta] = None,
ttl: Optional[timedelta] = None,
) -> None:
"""Registers actor reminder.
Expand Down
2 changes: 1 addition & 1 deletion dapr/actor/runtime/mock_actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async def register_reminder(
name: str,
state: bytes,
due_time: timedelta,
period: timedelta,
period: Optional[timedelta] = None,
ttl: Optional[timedelta] = None,
) -> None:
"""Adds actor reminder to self._state_manager._mock_reminders.
Expand Down
2 changes: 1 addition & 1 deletion dapr/actor/runtime/state_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def ttl_in_seconds(self) -> Optional[int]:
return self._ttl_in_seconds

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


Expand Down
4 changes: 2 additions & 2 deletions dapr/clients/grpc/_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
super(InvokeMethodRequest, self).__init__(())

self._content_type = content_type
self._http_verb = None
self._http_verb: Optional[str] = None
self._http_querystring: Dict[str, str] = {}

self.set_data(data)
Expand All @@ -127,7 +127,7 @@
@http_verb.setter
def http_verb(self, val: Optional[str]) -> None:
"""Sets HTTP method to Dapr invocation request."""
if val not in self.HTTP_METHODS:
if val is not None and val not in self.HTTP_METHODS:

Check warning on line 130 in dapr/clients/grpc/_request.py

View check run for this annotation

Codecov / codecov/patch

dapr/clients/grpc/_request.py#L130

Added line #L130 was not covered by tests
raise ValueError(f'{val} is the invalid HTTP verb.')
self._http_verb = val

Expand Down