Return a sorted list of all available fix names in the given package.
187833
def get_all_fix_names(fixer_pkg, remove_prefix=True):
    """"""
    pkg = __import__(fixer_pkg, [], [], ["*"])
    fixer_dir = os.path.dirname(pkg.__file__)
    fix_names = []
    for name in sorted(os.listdir(fixer_dir)):
        if name.startswith("fix_") and name.endswith(".py"):
            if remove_prefix:
                name = name[4:]
            fix_names.append(name[:-3])
    return fix_names
1043696
def query_cached_package_list(self):
        """"""
        if self.debug:
            self.logger.debug("DEBUG: reading pickled cache file")
        return cPickle.load(open(self.pkg_cache_file, "r"))
111507
def find_all(name, opts={})
      # opts ||= {}
      all = [@packages.select {|x| x.name.to_s == name.to_s },
      find_all_by_provides(name, opts)].flatten.compact
      filter(all, opts)
    end
574388
def get_pkg_names(pkgs):
    
    result = set()
    with open(join("mapping"), "r") as f:
        data = dict(x.strip().split(":") for x in f)
    for pkg in pkgs:
        # Look up the mapped requirement. If a mapping isn't found,
        # simply use the package name.
        result.add(data.get(pkg, pkg))
    # Return a sorted list for backward compatibility.
    return sorted(result, key=lambda s: s.lower())
1317477
def get_pkg_paths(pkg_name, out_dir):
    """"""
    paths = []
    try:
        pkg = import_module(pkg_name)
        if not hasattr(pkg, "__path__"):
            return get_mod_paths(pkg_name, out_dir)
        for mod_info in walk_packages(pkg.__path__, pkg.__name__ + "."):
            mod_paths = get_mod_paths(mod_info.name, out_dir)
            paths.extend(mod_paths)
    except Exception as e:
        _logger.debug(e)
        _logger.warning("cannot handle package, skipping: %s", pkg_name)
    return paths
876373
def _resolve_name(name, package, level):
    """"""
    bits = package.rsplit('.', level - 1)
    if len(bits) < level:
        raise ValueError('attempted relative import beyond top-level package')
    base = bits[0]
    return '{}.{}'.format(base, name) if name else base
939924
def packages(self):
        
        queue_list = []
        for read in self.queued.splitlines():
            read = read.lstrip()
            if not read.startswith("#"):
                queue_list.append(read.replace("\n", ""))
        return queue_list
732312
def resolving_deps(self):
        
        requires = []
        if (self.meta.rsl_deps in ["on", "ON"] and
                self.flag != "--resolve-off"):
            self.msg.resolving()
        for dep in self.packages:
            status(0.05)
            dependencies = []
            dependencies = Utils().dimensional_list(Dependencies(
                self.repo, self.blacklist).binary(dep, self.flag))
            requires += self._fix_deps_repos(dependencies)
            self.deps_dict[dep] = Utils().remove_dbs(requires)
        return Utils().remove_dbs(requires)
677665
def package_releases(self, package, url_fmt=lambda u: u):
        
        return [{
            'name': package,
            'version': version,
            'urls': [self.get_urlhash(f, url_fmt) for f in files]
        } for version, files in self.storage.get(package, {}).items()]
1362275
def matching(self):
        
        for sbo in self.package_not_found:
            for pkg in self.data:
                if sbo in pkg and pkg not in self.blacklist:
                    self.package_found.append(pkg)
128214
def get_version(package):
    """"""
    with io.open(os.path.join(BASE_DIR, package, '__init__.py'), encoding='utf-8') as fh:
        return [
            l.split('=', 1)[1].strip().strip("'").strip('"')
            for l in fh.readlines()
            if '__version__' in l][0]
1310257
def global_fixes():
    """"""
    for function in list(globals().values()):
        if inspect.isfunction(function):
            arguments = _get_parameters(function)
            if arguments[:1] != ['source']:
                continue

            code = extract_code_from_function(function)
            if code:
                yield (code, function)
79811
def get_dep_names_of_package(
        package,
        keep_version_pins=False,
        recursive=False,
        verbose=False,
        include_build_requirements=False
        ):
    

    # First, obtain the dependencies:
    dependencies = get_package_dependencies(
        package, recursive=recursive, verbose=verbose,
        include_build_requirements=include_build_requirements,
    )
    if verbose:
        print("get_dep_names_of_package_folder: " +
              "processing dependency list to names: " +
              str(dependencies))

    # Transform dependencies to their stripped down names:
    # (they can still have version pins/restrictions, conditionals, ...)
    dependency_names = set()
    for dep in dependencies:
        # If we are supposed to keep exact version pins, extract first:
        pin_to_append = ""
        if keep_version_pins and "(==" in dep and dep.endswith(")"):
            # This is a dependency of the format: 'pkg (==1.0)'
            pin_to_append = "==" + dep.rpartition("==")[2][:-1]
        elif keep_version_pins and "==" in dep and not dep.endswith(")"):
            # This is a dependency of the format: 'pkg==1.0'
            pin_to_append = "==" + dep.rpartition("==")[2]
        # Now get true (and e.g. case-corrected) dependency name:
        dep_name = get_package_name(dep) + pin_to_append
        dependency_names.add(dep_name)
    return dependency_names
950819
def all_packages(self):
        """"""
        p = dict(self.parsed_pipfile.get("dev-packages", {}))
        p.update(self.parsed_pipfile.get("packages", {}))
        return p
329566
def get_package_info(package):
    """"""
    url = 'https://pypi.python.org/pypi/{}/json'.format(package)
    r = requests.get(url)
    r.raise_for_status()
    return r.json()
1184460
def get_single_fixer(fixname):
    ''''''
    fixer_dirname = fixer_dir.__path__[0]
    for name in sorted(os.listdir(fixer_dirname)):
        if (name.startswith("fix_") and name.endswith(".py") 
            and fixname == name[4:-3]):
            return "lib2to3.fixes." + name[:-3]
191006
private static List<String> normalizePackagePrefixes(List<String> packages)
    {
        if (packages == null)
            return null;

        List<String> result = new ArrayList<>(packages.size());
        for (String pkg : packages)
        {
            if(pkg.endsWith(".*")){
                System.out.println("Warning: removing the .* suffix from the package prefix: " + pkg);
            }
            result.add(StringUtils.removeEndIgnoreCase(pkg, ".*"));
        }

        return packages;
    }