

def __init__(self, rawtext):
    self.rawtext = rawtext
    t = self.rawtext.rsplit('-', 2)
    if (len(t) != 3):
        raise MalformedGitTag(self.rawtext)
    (vinfo, self.ncommits, self.sha) = t
    self.ncommits = int(self.ncommits)
    match = RE_XYZ.match(vinfo)
    (self.ver_maj, self.ver_min, self.ver_patch, self.ver_extra) = match.groups()
    if self.ver_extra:
        self.ver_extra = re.sub('^dp', 'a', self.ver_extra, count=1)
        self.ver_extra = re.sub('^beta', 'b', self.ver_extra, count=1)
        m = re.search('^([ab])(\\d+)?', self.ver_extra)
        if (m.group(2) is None):
            first = match.ver_extra[0]
            self.ver_extra = ((first + '0') + self.ver_extra[1:])

dataset/ETHPy150Open couchbase/couchbase-python-client/couchbase_version.py VersionInfo.__init__/VarMisuse@188/238 `self`->`match`