def run(self, edit, options):
        if "gist" not in options:
            return

        # Get filename and gist from chosen options
        filename = options["fileName"]
        _gist = options["gist"]

        # Prepare data for update
        data = {
            "files": {
                filename: {
                    "content": self.selection
                }
            }
        }

        settings = util.get_settings()
        api = GistApi(settings["token"])
        thread = threading.Thread(target=api.patch, args=(_gist["url"], data, ))
        thread.start()
        ThreadProgress(api, thread, 'Updating Gist %s' % filename,
            callback.update_to_gist, _callback_options={
                "fileName": filename
            }
        )
dataset/ETHPy150Open xjsender/HaoGist/main.py/UpdateContentToGist.run/original