MCPcopy
hub / github.com/jisaacks/GitGutter / resolve

Method resolve

modules/promise.py:76–88  ·  view source on GitHub ↗

Immediatelly resolve a Promise. Convenience function for creating a Promise that gets immediately resolved with the specified value. Arguments: resolve_value: The value to resolve the promise with.

(cls, resolve_value=None)

Source from the content-addressed store, hash-verified

74
75 @classmethod
76 def resolve(cls, resolve_value=None):
77 """Immediatelly resolve a Promise.
78
79 Convenience function for creating a Promise that gets immediately
80 resolved with the specified value.
81
82 Arguments:
83 resolve_value: The value to resolve the promise with.
84 """
85 def executor(resolve_fn):
86 return resolve_fn(resolve_value)
87
88 return cls(executor)
89
90 def then(self, callback):
91 """Create a new promise and chain it with this promise.

Callers 5

update_git_fileMethod · 0.80
_update_from_commitMethod · 0.80
git_read_fileMethod · 0.80
execute_asyncMethod · 0.80
test_promise_resolveMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_promise_resolveMethod · 0.64