MCPcopy Index your code
hub / github.com/diffgram/diffgram / toggle_flag_shared

Method toggle_flag_shared

shared/database/source_control/file.py:1177–1198  ·  view source on GitHub ↗

Basically converts the file into a video file to toggle it Not really happy with this "side effect"... careful with the "double toggle" only want to run it once... The reason the side effect is here is because of the awkward way that annotation_update() retu

(self,
                           session)

Source from the content-addressed store, hash-verified

1175
1176 # Video and images
1177 def toggle_flag_shared(self,
1178 session):
1179 """
1180 Basically converts the file into a video file to toggle it
1181 Not really happy with this "side effect"...
1182 careful with the "double toggle" only want to run it once...
1183
1184 The reason the side effect is here is because of the awkward
1185 way that annotation_update() returns the frame file
1186 but then we actually do want to send the video file with
1187 the update flag... something to do but will require more testing and review...
1188
1189 """
1190
1191 file = self
1192 if file.video_parent_file_id: # Frame file that's child of video
1193 # TODO use new flag .is_child_of_video in future?
1194 file = file.video_parent_file(session)
1195
1196 file = File.toggle_flag_single_file(session, file)
1197
1198 return file
1199
1200 @staticmethod
1201 def get_by_label_name(session, label_name, project_id):

Callers 4

ann_is_complete_toggleFunction · 0.80
annotation_update_webFunction · 0.80
task_completeFunction · 0.80

Calls 2

video_parent_fileMethod · 0.80

Tested by

no test coverage detected