MCPcopy
hub / github.com/catppuccin/catppuccin / run

Method run

samples/python1.py:314–324  ·  view source on GitHub ↗
(self, edit)

Source from the content-addressed store, hash-verified

312 """
313
314 def run(self, edit):
315 vcs = get_vcs(self.get_working_dir())
316 filepath = self.view.file_name()
317 filename = os.path.basename(filepath)
318 max_file_size = self.settings.get('max_file_size', 1024) * 1024
319 if not os.path.exists(filepath) or os.path.getsize(filepath) > max_file_size:
320 # skip large files
321 return
322 get_command = getattr(self, '{0}_diff_command'.format(vcs['name']), None)
323 if get_command:
324 self.run_command(get_command(filename), self.diff_done)
325
326 def diff_done(self, result):
327 self.log('diff_done', result)

Callers 1

executeFunction · 0.45

Calls 3

get_vcsFunction · 0.85
run_commandMethod · 0.80
get_working_dirMethod · 0.45

Tested by

no test coverage detected