@@ -320,7 +320,7 @@ def create_project(
320320 :type workflows: list of dicts
321321
322322 :param workflow: the name of the workflow already created within the team, which must match exactly.
323- If None, the default “Annotator can’t complete” system workflow will be set.
323+ If None, the default “System workflow” workflow will be set.
324324 :type workflow: str
325325
326326 :param instructions_link: str of instructions URL
@@ -2262,7 +2262,7 @@ def add_contributors_to_project(
22622262 self ,
22632263 project : NotEmptyStr ,
22642264 emails : conlist (EmailStr , min_items = 1 ),
2265- role : ANNOTATOR_ROLE ,
2265+ role : str ,
22662266 ) -> Tuple [List [str ], List [str ]]:
22672267 """Add contributors to project.
22682268
@@ -2318,7 +2318,7 @@ def invite_contributors_to_team(
23182318
23192319 def get_annotations (
23202320 self ,
2321- project : Union [NotEmptyStr , int ],
2321+ project : Union [int , NotEmptyStr ],
23222322 items : Optional [Union [List [NotEmptyStr ], List [int ]]] = None ,
23232323 ):
23242324 """Returns annotations for the given list of items.
@@ -2663,8 +2663,8 @@ def search_items(
26632663
26642664 def list_items (
26652665 self ,
2666- project : Union [str , int ],
2667- folder : Optional [Union [str , int ]] = None ,
2666+ project : Union [int , str ],
2667+ folder : Optional [Union [int , str ]] = None ,
26682668 * ,
26692669 include : List [Literal ["assignments" , "custom_metadata" ]] = None ,
26702670 ** filters ,
@@ -2674,12 +2674,12 @@ def list_items(
26742674
26752675 :param project: The project name, project ID, or folder path (e.g., "project1/folder1") to search within.
26762676 This can refer to the root of the project or a specific subfolder.
2677- :type project: Union[str, int ]
2677+ :type project: Union[int, str ]
26782678
26792679 :param folder: The folder name or ID to search within. If None, the search will be done in the root folder of
26802680 the project. If both “project” and “folder” specify folders, the “project”
26812681 value will take priority.
2682- :type folder: Union[str, int ], optional
2682+ :type folder: Union[int, str ], optional
26832683
26842684 :param include: Specifies additional fields to include in the response.
26852685
@@ -2771,15 +2771,17 @@ def list_items(
27712771 )
27722772 """
27732773 project = (
2774- project
2774+ self . controller . get_project_by_id ( project ). data
27752775 if isinstance (project , int )
27762776 else self .controller .get_project (project )
27772777 )
27782778 if folder is None :
27792779 folder = self .controller .get_folder (project , "root" )
27802780 else :
27812781 if isinstance (folder , int ):
2782- folder = self .controller .get_folder_by_id (project .id , folder )
2782+ folder = self .controller .get_folder_by_id (
2783+ project_id = project .id , folder_id = folder
2784+ ).data
27832785 else :
27842786 folder = self .controller .get_folder (project , folder )
27852787 include = include or []
0 commit comments