@@ -485,7 +485,8 @@ def move_task(
485485
486486 Move a task to a different project, section, or parent task.
487487
488- `project_id` takes predence, followed by `section_id` (which also updates `project_id`),
488+ `project_id` takes predence, followed by
489+ `section_id` (which also updates `project_id`),
489490 and then `parent_id` (which also updates `section_id` and `project_id`).
490491
491492 :param task_id: The ID of the task to move.
@@ -495,8 +496,18 @@ def move_task(
495496 :return: True if the task was moved successfully,
496497 False otherwise (possibly raise `HTTPError` instead).
497498 :raises requests.exceptions.HTTPError: If the API request fails.
498- :raises ValueError: If neither `project_id`, `section_id`, nor `parent_id` is provided.
499+ :raises ValueError: When `task_id` is not provided.
500+ :raises ValueError: If neither `project_id`, `section_id`,
501+ nor `parent_id` is provided.
499502 """
503+ if task_id is None :
504+ raise ValueError ("`task_id` must be provided." )
505+
506+ if project_id is None and section_id is None and parent_id is None :
507+ raise ValueError (
508+ "Either `project_id`, `section_id`, or `parent_id` must be provided."
509+ )
510+
500511 data : dict [str , Any ] = {}
501512 if project_id is not None :
502513 data ["project_id" ] = project_id
0 commit comments