Edit a version = "1.2.3" or version="1.2.3",
        :return:

def jiggle_setup_py(self):  # type: () -> int
        """
        Edit a version = "1.2.3" or version="1.2.3",
        :return:
        """
        changed = 0
        setup_py = os.path.join(self.SRC, "setup.py")
        if not os.path.isfile(setup_py):
            return changed
        lines_to_write = []
        need_rewrite = False

        encoding = chardet.detect(io.open(setup_py, "rb").read())
        # logger.warning("guessing encoding " + str(encoding))
        with self.file_opener.open_this(setup_py, "r") as infile:
            for line in infile:
                leading_white = self.leading_whitespace(line)

                simplified_line = dunder_version.simplify_line(line, keep_comma=True)

                # determine if we have a version=
                version = kwarg_version.find_in_line(line)
                # setup() function args
                if version:
                    if simplified_line.strip(" \t\n").startswith(","):
                        start_comma = ","
                    else:
                        start_comma = ""

                    comma = ""
                    if simplified_line.strip(" \t\n").endswith(","):
                        comma = ","
                    # could happen, say on last.
                    # if not comma and not start_comma:
                    #     print(simplified_line)
                    #     raise TypeError("$$$$$")
                    source = '{0}{1}version = "{2}"{3}{4}\n'.format(
                        leading_white,
                        start_comma,
                        unicode(self.version_to_write()),
                        comma,
                        self.signature,
                    )
                    need_rewrite = True
                    lines_to_write.append(source)
                    continue

                # code that isn't the setup() function args
                version, version_token = dunder_version.find_in_line(line)
                if version:
                    if simplified_line.strip(" \t\n").startswith(","):
                        start_comma = ","
                    else:
                        start_comma = ""

                    # the other simplify removes ","
                    if simplified_line.strip(" \t\n").endswith(","):
                        comma = ","
                    else:
                        comma = ""

                    lines_to_write.append(
                        '{0}{1}{2} = "{3}"{4}{5}\n'.format(
                            leading_white,
                            start_comma,
                            version_token,
                            unicode(self.version_to_write()),
                            comma,
                            self.signature,
                        )
                    )
                    need_rewrite = True
                    continue

                lines_to_write.append(line)

        if need_rewrite:
            check(
                self.file_opener.open_this(setup_py, "r").read(),
                "".join(lines_to_write),
            )
            with io.open(setup_py, "w", encoding=encoding["encoding"]) as outfile:

                outfile.writelines(lines_to_write)
                outfile.close()
                changed += 1
        return changed