@@ -37,7 +37,7 @@ collaboration = client.folder(folder_id='22222').collaborate(user, Collaboration
3737collaborator = collaboration.accessible_by
3838item = collaboration.item
3939has_accepted = ' has' if collaboration.status == ' accepted' else ' has not'
40- print (' {0 } {1 } accepted the collaboration to folder "{2} " ' .format(collaborator.name, has_accepted, item.name) )
40+ print (f ' { collaborator.name } { has_accepted } accepted the collaboration to folder " { item.name} " ' )
4141```
4242
4343Alternatively, you can also invite a user with their email address.
@@ -61,7 +61,7 @@ collaboration = client.folder(folder_id='22222').collaborate(group, Collaboratio
6161collaborator = collaboration.accessible_by
6262item = collaboration.item
6363has_accepted = ' has' if collaboration.status == ' accepted' else ' has not'
64- print (' {0 } {1 } accepted the collaboration to folder "{2} " ' .format(collaborator.name, has_accepted, item.name) )
64+ print (f ' { collaborator.name } { has_accepted } accepted the collaboration to folder " { item.name} " ' )
6565```
6666
6767> __ Note:__ The ` can_view_path ` parameter is currently only available for collaborations on folders.
@@ -74,15 +74,15 @@ print('{0} {1} accepted the collaboration to folder "{2}"'.format(collaborator.n
7474Edit a Collaboration
7575--------------------
7676
77- A collaboration can be edited by calling [ ` collaboration.update_info(role, status=None) ` ] [ update_info ] . This method
77+ A collaboration can be edited by calling [ ` collaboration.update_info(*, role=None , status=None, **kwargs ) ` ] [ update_info ] . This method
7878returns an updated [ ` Collaboration ` ] [ collaboration_class ] object, leaving the original unmodified.
7979
8080<!-- sample put_collaborations_id -->
8181``` python
8282from boxsdk.object.collaboration import CollaborationRole, CollaborationStatus
8383
8484collaboration = client.collaboration(collab_id = ' 12345' )
85- updated_collaboration = collaboration.update_info(CollaborationRole.EDITOR )
85+ updated_collaboration = collaboration.update_info(role = CollaborationRole.EDITOR )
8686```
8787
8888[ update_info ] : https://box-python-sdk.readthedocs.io/en/latest/boxsdk.object.html#boxsdk.object.collaboration.Collaboration.update_info
@@ -128,15 +128,15 @@ To retrieve all collaborations on a specified [`Folder`][folder_class] or [`File
128128collaborations = client.folder(folder_id = ' 22222' ).get_collaborations()
129129for collab in collaborations:
130130 target = collab.accessible_by
131- print (' {0 } {1 } is collaborated on the folder' .format(target.type.capitalize(), target.name) )
131+ print (f ' { target.type.capitalize() } { target.name } is collaborated on the folder ' )
132132```
133133
134134<!-- sample get_files_id_collaborations -->
135135``` python
136136collaborations = client.file(file_id = ' 11111' ).get_collaborations()
137137for collab in collaborations
138138 target = collab.accessible_by
139- print (' {0 } {1 } is collaborated on the file' .format(target.type.capitalize(), target.name) )
139+ print (f ' { target.type.capitalize() } { target.name } is collaborated on the file ' )
140140```
141141
142142[ folder_class ] : https://box-python-sdk.readthedocs.io/en/latest/boxsdk.object.html#boxsdk.object.folder.Folder
@@ -155,7 +155,7 @@ can use to iterate over all pending [`Collaboration`][collaboration_class] objec
155155``` python
156156pending_collaborations = client.get_pending_collaborations()
157157for pending_collaboration in pending_collaborations:
158- print (' Collaboration {0 } is pending' .format(pending_collaboration.id) )
158+ print (f ' Collaboration { pending_collaboration.id } is pending ' )
159159```
160160
161161[ get_pending_collaborations ] : https://box-python-sdk.readthedocs.io/en/latest/boxsdk.client.html#boxsdk.client.client.Client.get_pending_collaborations
0 commit comments