Returns a set of all unresolved imports.
16747
def get_all_unresolved(self):
        """"""
        assert self.final, 'Call build() before using the graph.'
        out = set()
        for v in self.broken_deps.values():
            out |= v
        return out
315470
function imports($imported_classes = []) {
    $imports = [];

    if ($imported_classes) {
      // Sort the imported classes.
      sort($imported_classes);

      foreach ($imported_classes as $fully_qualified_class_name) {
        $fully_qualified_class_name = ltrim($fully_qualified_class_name, '\\');
        $imports[] = "use $fully_qualified_class_name;";
      }

      $imports[] = '';
    }

    return $imports;
  }
590778
def tryImportAllPlugins(self):
        
        for regItem in self.registeredItems:
            if not regItem.triedImport:
                self.importRegItem(regItem)

        logger.debug("Importing finished.")
1188279
def python_modules():
        
        imported = {}
        results = {"builtins": sys.builtin_module_names, "imported": imported}
        for module_name, module_ in sys.modules.items():
            if module_name not in sys.builtin_module_names:
                try:
                    imported[module_name] = inspect.getfile(module_)
                except TypeError:
                    imported[
                        module_name
                    ] = "<no file information :: {0}>".format(repr(module_))

        return results
687314
def untracked_files(self) -> typing.List[str]:
        
        untracked_files = list(self.repo.untracked_files)
        LOGGER.debug('untracked files: %s', untracked_files)
        return untracked_files
130486
def get_imports(filename):
    
    with open(filename, "rb") as f:
        src = f.read()
    finder = ImportFinder()
    finder.visit(ast.parse(src, filename=filename))
    imports = []
    for i in finder.imports:
        name, _, is_from, is_star = i
        imports.append(i + (resolve_import(name, is_from, is_star),))
    return imports
1057204
private void getResolvedScriptSet(CharSequence input, ScriptSet result) {
        getResolvedScriptSetWithout(input, UScript.CODE_LIMIT, result);
    }
1049856
def resolve_all(self, import_items):
        
        for import_item in import_items:
            try:
                yield self.resolve_import(import_item)
            except ImportException as err:
                logging.info('unknown module %s', err.module_name)
99460
def extract_imports(script):
    """"""
    if not os.path.isfile(script):
        raise ValueError('Not a file: %s' % script)
    parse_tree = parse_python(script)
    result = find_imports(parse_tree)
    result.path = script
    return result
924273
def checkDeadScopes(self):
        
        for scope in self.deadScopes:
            # imports in classes are public members
            if isinstance(scope, ClassScope):
                continue

            all_binding = scope.get('__all__')
            if all_binding and not isinstance(all_binding, ExportBinding):
                all_binding = None

            if all_binding:
                all_names = set(all_binding.names)
                undefined = all_names.difference(scope)
            else:
                all_names = undefined = []

            if undefined:
                if not scope.importStarred and \
                   os.path.basename(self.filename) != '__init__.py':
                    # Look for possible mistakes in the export list
                    for name in undefined:
                        self.report(messages.UndefinedExport,
                                    scope['__all__'].source, name)

                # mark all import '*' as used by the undefined in __all__
                if scope.importStarred:
                    from_list = []
                    for binding in scope.values():
                        if isinstance(binding, StarImportation):
                            binding.used = all_binding
                            from_list.append(binding.fullName)
                    # report * usage, with a list of possible sources
                    from_list = ', '.join(sorted(from_list))
                    for name in undefined:
                        self.report(messages.ImportStarUsage,
                                    scope['__all__'].source, name, from_list)

            # Look for imported names that aren't used.
            for value in scope.values():
                if isinstance(value, Importation):
                    used = value.used or value.name in all_names
                    if not used:
                        messg = messages.UnusedImport
                        self.report(messg, value.source, str(value))
                    for node in value.redefined:
                        if isinstance(self.getParent(node), FOR_TYPES):
                            messg = messages.ImportShadowedByLoopVar
                        elif used:
                            continue
                        else:
                            messg = messages.RedefinedWhileUnused
                        self.report(messg, node, value.name, value.source)
361652
def get_from_import(self, resource, name):
        """"""
        module_name = libutils.modname(resource)
        names = []
        if isinstance(name, list):
            names = [(imported, None) for imported in name]
        else:
            names = [(name, None), ]
        return FromImport(module_name, 0, tuple(names))
341135
@Nonnull
	public Imports filter() {
		return new Imports(Sets.newHashSet(Collections2.filter(imports, Predicates.and(IGNORE_JAVA_LANG, IGNORE_UNDEFINED))));
	}
34909
public java.util.List<String> getImportTablesCompleted() {
        if (importTablesCompleted == null) {
            importTablesCompleted = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return importTablesCompleted;
    }
964072
def resolve_node_modules(self):
        ''
        if not self.resolved_node_modules:
            try:
                self.resolved_node_modules = [
                    importlib.import_module(mod, self.node_package)
                    for mod in self.node_modules
                ]
            except ImportError:
                self.resolved_node_modules = []
                raise

        return self.resolved_node_modules
411677
def find_imports_and_track_names(filename, warn_about_duplicates=False,
                                 verbose=False):
    
    with open(filename) as f:
        root = ast.parse(f.read(), filename)
    visitor = ImportFinderAndNameTracker(filename)
    visitor.warn_about_duplicates = warn_about_duplicates
    visitor.verbose = verbose
    visitor.visit(root)
    visitor.leaveAllScopes()
    return visitor.imports, visitor.unused_names
994921
public java.util.List<String> getImportTablesNotStarted() {
        if (importTablesNotStarted == null) {
            importTablesNotStarted = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return importTablesNotStarted;
    }
72648
def resolve_imports(self, imports, import_depth, parser=None):
        
        if imports and import_depth:
            for i in list(self.imports):
                try:

                    if os.path.exists(i) or i.startswith(('http', 'ftp')):
                        self.merge(Ontology(i, import_depth=import_depth-1, parser=parser))

                    else: # try to look at neighbouring ontologies
                        self.merge(Ontology( os.path.join(os.path.dirname(self.path), i),
                                             import_depth=import_depth-1, parser=parser))

                except (IOError, OSError, URLError, HTTPError, _etree.ParseError) as e:
                    warnings.warn("{} occured during import of "
                                  "{}".format(type(e).__name__, i),
                                  ProntoWarning)