Returns the version of the resolved dependency
963608
def version
      return @detected_version if defined? @detected_version
      version = installed_versions.find { |p, _v| p == path }
      @detected_version = version.nil? ? nil : version[1]
    end
294794
def get_complete_version(version=None):
    
    if version is None:
        from promise import VERSION

        return VERSION
    else:
        assert len(version) == 5
        assert version[3] in ("alpha", "beta", "rc", "final")

    return version
420531
def get_version(self, cached=True):
        """"""
        if hasattr(self.__class__, '_version') and cached:
            version = self.__class__._version
        else:
            repo = self.get_repo()
            if repo is not None:
                head = repo.head
                version = head.commit.hexsha
                if repo.is_dirty():
                    version += "*"
            else:
                version = None
        self.__class__._version = version
        return version
549491
function(dependencies) {
        var _dependencies = dependencies || {};
        var _numberOfOudatedPackages = Object.keys(_dependencies).length;
        var _minor = semver.allMinor(dependencies, 'latest');
        var _major = semver.allMajor(dependencies, 'latest');
        var _patch = semver.allPatch(dependencies, 'latest`');
        var _passing = (
          options['up-to-dateness'].number >= _numberOfOudatedPackages &&
          _major.passing === true &&
          _minor.passing === true &&
          _patch.passing === true
        );

        return {
          passing: _passing,
          outdated: _.merge(_major.outdated, _minor.outdated, _patch.outdated)
        };
      }
117528
function determineVersion(module) {
		var json;

		if (!('version' in module)) {
			json = module.options.path + '/package.json';
			delete require.cache[json];
			json = require(json);

			['dependencies', 'devDependencies', 'optionalDependencies'].forEach(function(dep) {
				if (dep in json && module.name in json[dep]) {
					module.version = json[dep][module.name];
				}
			});
		}
	}
624146
def get_version():
    """"""

    path = os.path.join(os.path.dirname(__file__), 'backrefs')
    fp, pathname, desc = imp.find_module('__meta__', [path])
    try:
        vi = imp.load_module('__meta__', fp, pathname, desc).__version_info__
        return vi._get_canonical(), vi._get_dev_status()
    except Exception:
        print(traceback.format_exc())
    finally:
        fp.close()
769396
def _get_version():
    '''
    
    '''
    version_string = __salt__['cmd.run'](
        [_check_xbps(), '--version'],
        output_loglevel='trace')
    if version_string is None:
        # Dunno why it would, but...
        return False

    VERSION_MATCH = re.compile(r'(?:XBPS:[\s]+)([\d.]+)(?:[\s]+.*)')
    version_match = VERSION_MATCH.search(version_string)
    if not version_match:
        return False

    return version_match.group(1).split('.')
23974
private static String getVersion() {
    Properties props = new Properties();
    try (InputStream is =
        NGConstants.class.getResourceAsStream(
            "/META-INF/maven/com.facebook/nailgun-server/pom.properties")) {
      props.load(is);
    } catch (Throwable e) {
      // In static initialization context, outputting or logging an exception is dangerous
      // It smells bad, but let's ignore it
    }
    return props.getProperty("version", System.getProperty("nailgun.server.version", "[UNKNOWN]"));
  }
896442
def get_version(self):
        """"""
        _, version = misc.get_version(self.confdir)
        if version is None:
            return "Can't get the version."
        else:
            return "cslbot - %s" % version
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
663082
def package_version(self):
        """"""
        vbase = self.base_version
        if self.ncommits:
            vbase += '.dev{0}+{1}'.format(self.ncommits, self.sha)
        return vbase
1309568
public static String getVersion() {
		String version = EnvironmentInformation.class.getPackage().getImplementationVersion();
		return version != null ? version : UNKNOWN;
	}
627197
def get_version():
    
    if not INSTALLED:
        try:
            with open('version.txt', 'r') as v_fh:
                return v_fh.read()
        except Exception:
            warnings.warn(
                'Unable to resolve package version until installed',
                UserWarning
            )
            return '0.0.0'  #can't parse version without stuff installed

    return p_version.get_version(HERE)
954841
def get_pkg_version():
    """"""
    try:
        with open("PKG-INFO", "r") as fp:
            rgx = re.compile(r"Version: (\d+)")
            for line in fp.readlines():
                match = rgx.match(line)
                if match:
                    return match.group(1)
    except IOError:
        return None
798646
function getVersions() {
  const paths = [
    getDestPackageFile('ngd3'),
  ];

  return paths
    .map(path => require(path))
    .map(pkgs => pkgs.version);
}
101904
def get_version() :
    ""
    major = ct.c_int()
    minor = ct.c_int()
    micro = ct.c_int()
    dbus.dbus_get_version(ct.byref(major), ct.byref(minor), ct.byref(micro))
    return \
        (major.value, minor.value, micro.value)
1115014
protected String getCurrentReleaseVersion() {
        HttpURLConnection conn = null;
        try {
            final String str = settings.getString(Settings.KEYS.ENGINE_VERSION_CHECK_URL, "http://jeremylong.github.io/DependencyCheck/current.txt");
            final URL url = new URL(str);
            final URLConnectionFactory factory = new URLConnectionFactory(settings);
            conn = factory.createHttpURLConnection(url);
            conn.connect();
            if (conn.getResponseCode() != 200) {
                return null;
            }
            final String releaseVersion = IOUtils.toString(conn.getInputStream(), StandardCharsets.UTF_8);
            if (releaseVersion != null) {
                return releaseVersion.trim();
            }
        } catch (MalformedURLException ex) {
            LOGGER.debug("Unable to retrieve current release version of dependency-check - malformed url?");
        } catch (URLConnectionFailureException ex) {
            LOGGER.debug("Unable to retrieve current release version of dependency-check - connection failed");
        } catch (IOException ex) {
            LOGGER.debug("Unable to retrieve current release version of dependency-check - i/o exception");
        } finally {
            if (conn != null) {
                conn.disconnect();
            }
        }
        return null;
    }