Skip to content

Commit ed37be4

Browse files
authored
chore: change docstrings + set mode json for better object dumps (#304)
1 parent 9d8604f commit ed37be4

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

taskiq/abc/serializer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ def loadb(self, value: bytes) -> Any:
1919
"""
2020
Parse byte-encoded value received from the wire.
2121
22-
:param message: value to parse.
22+
:param value: value to decode.
2323
:return: decoded value.
2424
"""

taskiq/api/receiver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async def run_receiver_task(
4545
:param max_prefetch: maximum number of tasks to prefetch.
4646
:param propagate_exceptions: whether to propagate exceptions in generators or not.
4747
:param run_startup: whether to run startup function or not.
48-
48+
:param ack_time: acknowledge type to use.
4949
:raises asyncio.CancelledError: if the task was cancelled.
5050
"""
5151

taskiq/compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def model_validate(
2828
return model_class.model_validate(message)
2929

3030
def model_dump(instance: Model) -> Dict[str, Any]:
31-
return instance.model_dump()
31+
return instance.model_dump(mode="json")
3232

3333
def model_validate_json(
3434
model_class: Type[Model],

taskiq/scheduler/merge_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def only_new(
4949
"""
5050
This function preserves only new schedules.
5151
52-
:param old_tasks: previously discovered tasks.
52+
:param _old_tasks: previously discovered tasks.
5353
:param new_tasks: newly discovered schedules.
5454
:return: list of new schedules.
5555
"""

taskiq/scheduler/scheduler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ async def on_ready(self, source: "ScheduleSource", task: ScheduledTask) -> None:
3838
This method is called when task is ready to be enqueued.
3939
4040
It's triggered on proper time depending on `task.cron` or `task.time` attribute.
41+
:param source: source that triggered this event.
4142
:param task: task to send
4243
"""
4344
try:

0 commit comments

Comments
 (0)