def edit_file(self, filename):
        import subprocess
        editor = self.get_editor()
        if self.env:
            environ = os.environ.copy()
            environ.update(self.env)
        else:
            environ = None
        try:
            c = subprocess.Popen('%s "%s"' % (editor, filename),
                                 env=environ, shell=True)
            exit_code = c.wait()
            if exit_code != 0:
                raise ClickException(editor % '%s: Editing failed!')
        except OSError as e:
            raise ClickException('%s: Editing failed: %s' % (editor, e))
dataset/ETHPy150Open pallets/click/click/_termui_impl.py/Editor.edit_file/swapped operands of `%`