def cleanup(self):
        EventHandler().unregister_handler(self)
        filepath = self.view.file_name()
        self.window.focus_view(self.view)
        self.window.run_command("close_file")
        if self.post_remove and os.path.exists(filepath):
            os.remove(filepath)
Cleanup after callback is called
dataset/ETHPy150Open spywhere/Javatar/core/json_panel.py/JSONPanel.cleanup