Reads the version (MAJOR.MINOR) from this module.
334150
def get_version():
    """"""
    release = get_release()
    split_version = release.split(".")
    if len(split_version) == 3:
        return ".".join(split_version[:2])
    return release
598852
def get_version():
    """"""
    with io.open('grammar_check/__init__.py', encoding='utf-8') as input_file:
        for line in input_file:
            if line.startswith('__version__'):
                return ast.parse(line).body[0].value.s
972736
def check_isis_version(major, minor=0, patch=0):
    """"""
    if ISIS_VERSION and (major, minor, patch) <= ISIS_VERISON_TUPLE:
        return

    msg = 'Version %s.%s.%s of isis required (%s found).'
    raise VersionError(msg % (major, minor, patch, ISIS_VERSION))
504818
def read_version():
    
    regex = re.compile('^(?P<number>\d.*?) .*$')

    with open('../CHANGELOG.rst') as f:
        for line in f:
            match = regex.match(line)
            if match:
                return match.group('number')
1198442
def _check_version(self, major, minor):
        
        if major < self.bz_ver_major:
            return True
        if (major == self.bz_ver_major and minor <= self.bz_ver_minor):
            return True
        return False
1355391
def version_dict(version):
    """"""
    match = version_re.match(str(version) or '')
    letters = 'alpha pre'.split()
    numbers = 'major minor1 minor2 minor3 alpha_ver pre_ver'.split()
    if match:
        d = match.groupdict()
        for letter in letters:
            d[letter] = d[letter] if d[letter] else None
        for num in numbers:
            if d[num] == '*':
                d[num] = 99
            else:
                d[num] = int(d[num]) if d[num] else None
    else:
        d = dict((k, None) for k in numbers)
        d.update((k, None) for k in letters)
    return d
136543
public void setVersion(int major, int minor) {
        if (major > 65535 || minor > 65535) {
            throw new IllegalArgumentException("Version number element cannot exceed 65535");
        }

        mVersion = (minor << 16) | (major & 0xffff);

        String target;
        switch (major) {
        default:
            target = null;
            break;
        case 45:
            target = minor == 3 ? "1.0" : null;
            break;
        case 46:
            target = minor == 0 ? "1.2" : null;
            break;
        case 47:
            target = minor == 0 ? "1.3" : null;
            break;
        case 48:
            target = minor == 0 ? "1.4" : null;
            break;
        case 49:
            target = minor == 0 ? "1.5" : null;
            break;
        case 50:
            target = minor == 0 ? "1.6" : null;
            break;
        case 51:
            target = minor == 0 ? "1.7" : null;
            break;
        }

        mTarget = target;
    }
599939
def current_version_string():
    """"""
    return "{0}.{1}.{2}".format(sys.version_info.major,
                                sys.version_info.minor,
                                sys.version_info.micro)
781591
def version(self):
        
        response = self.get(version="", base="/version")
        response.raise_for_status()
        data = response.json()
        return (data["major"], data["minor"])
966949
def __parse_scanned_version_info(self):
        """"""
        string = self.sys_version_info_formatted
        try:
            major, minor, micro, release_level, serial = string.split(",")
            if (release_level in ("alfa", "beta", "candidate", "final") and
                    (release_level != "final" or serial == "0") and
                    major.isdigit() and  # --- --- --- --- --- --- --- --- ---
                    minor.isdigit() and  # Explicit isdigit() checks to detect
                    micro.isdigit() and  # leading/trailing whitespace.
                    serial.isdigit()):   # --- --- --- --- --- --- --- --- ---
                self.sys_version_info = (int(major), int(minor), int(micro),
                    release_level, int(serial))
                self.__construct_python_version()
                return
        except (KeyboardInterrupt, SystemExit):
            raise
        except Exception:
            pass
        raise BadEnvironment("Unsupported Python version (%s)" % (string,))
1290970
def get_version():
    """"""
    try:
        # Try with the package manager, if present
        from pkg_resources import resource_string
        return resource_string(__name__, "VERSION.txt").decode('utf8').strip()
    except Exception:
        # If the package manager is not present, try reading the file
        version = os.path.join(os.path.dirname(__file__), "VERSION.txt")
        with open(version, "r") as f:
            return f.readlines()[0].strip()
1000992
def get_version():
    
    _globals = {}
    _locals = {}
    exec(
        compile(
            open(TOP + "/manta/version.py").read(), TOP + "/manta/version.py",
            'exec'), _globals, _locals)
    return _locals["__version__"]
282599
def version(self, version_str: str) -> None:
        
        ver = []
        for i in version_str.split('.'):
            ver.append(int(i))
            self.filter_negatives(int(i))
        self._major, self._minor, self._patch = ver[0], ver[1], ver[2]
1364991
def python_version():
    ''''''
    major, minor, patch = sys.version_info[0:3]
    return '{0}.{1}.{2}'.format(major, minor, patch)
168952
def get_version():
    
    assert sparser_path is not None, "Sparser path is not defined."
    with open(os.path.join(sparser_path, 'version.txt'), 'r') as f:
        version = f.read().strip()
    return version
343747
def parse_version(ver, pre=False):
    """"""

    m = RE_VER.match(ver)

    # Handle major, minor, micro
    major = int(m.group('major'))
    minor = int(m.group('minor')) if m.group('minor') else 0
    micro = int(m.group('micro')) if m.group('micro') else 0

    # Handle pre releases
    if m.group('type'):
        release = PRE_REL_MAP[m.group('type')]
        pre = int(m.group('pre'))
    else:
        release = "final"
        pre = 0

    # Handle development releases
    dev = m.group('dev') if m.group('dev') else 0
    if m.group('dev'):
        dev = int(m.group('dev'))
        release = '.dev-' + release if pre else '.dev'
    else:
        dev = 0

    # Handle post
    post = int(m.group('post')) if m.group('post') else 0

    return Version(major, minor, micro, release, pre, post, dev)
809758
def get_version(self):
        """"""
        return mgz.const.VERSIONS[self._header.version], str(self._header.sub_version)[:5]