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

Method main

default/methods/share/share.py:145–169  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

143 self.notify = notify
144
145 def main(self):
146 if self.mode == "NEW":
147 self.new()
148
149 if log_has_error(self.log):
150 return
151
152 # Could add "update" here in future...
153 if self.mode in ["REMOVE"]:
154 self.verify_member_list_untrusted()
155
156 for member in self.member_list:
157
158 self.member_to_modify = member
159
160 if self.mode == "REMOVE":
161 self.remove()
162
163 if log_has_error(self.log):
164 return
165
166 if len(self.log["error"].keys()) == 0:
167 # cache invalidation if successful
168 self.project.set_cache_key_dirty('member_list')
169 self.session.add(self.project)
170
171 def verify_member_list_untrusted(self):
172

Callers 3

share_member_project_apiFunction · 0.95
pytest_configureFunction · 0.45

Calls 6

newMethod · 0.95
removeMethod · 0.95
log_has_errorFunction · 0.90
set_cache_key_dirtyMethod · 0.80
addMethod · 0.45

Tested by 1

pytest_configureFunction · 0.36