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

Method get_allowed_label_file_ids

shared/annotation.py:808–830  ·  view source on GitHub ↗

This strictly a security feature Could also follow this "allowed" or not pattern # for sequences A perfect example of where it's nice to be able to have code that checks if something is in the list, and knows the list will exist...?

(self)

Source from the content-addressed store, hash-verified

806 self.instance_list_existing_dict[instance.id] = instance
807
808 def get_allowed_label_file_ids(self):
809 """
810 This strictly a security feature
811
812 Could also follow this "allowed" or not pattern
813 # for sequences
814
815 A perfect example of where it's nice to be able to have code that checks
816 if something is in the list, and knows the list will exist...?
817
818 """
819 project = self.project
820 if self.task:
821 logger.info(f"getting project from task {self.task.id}")
822 project = self.task.project
823
824 assert project is not None
825
826 if not project.label_dict:
827 project.refresh_label_dict(self.session)
828 self.allowed_label_file_id_list = project.label_dict.get('label_file_id_list')
829
830 assert self.allowed_label_file_id_list is not None
831
832 def validate_label_file_id(self):
833 """

Callers 1

__post_init__Method · 0.95

Calls 2

refresh_label_dictMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected