Path 1: 1034 calls (1.0)

1def open(self) -> None:
2        """Called before visiting project (i.e set of modules)."""
3        self.linter.stats.dependencies = {}
4        self.linter.stats = self.linter.stats
5        self.import_graph = defaultdict(set)
6        self._module_pkg = {}  # mapping of modules to the pkg they belong in
7        self._current_module_package = False
8        self._excluded_edges: defaultdict[str, set[str]] = defaultdict(set)
9        self._ignored_modules: Sequence[str] = self.linter.config.ignored_modules
10        # Build a mapping {'module': 'preferred-module'}
11        self.preferred_modules = dict(
12            module.split(":")
13            for module in self.linter.config.preferred_modules
14            if ":" in module
15        )
16        self._allow_any_import_level = set(self.linter.config.allow_any_import_level)
17        self._allow_reexport_package = self.linter.config.allow_reexport_from_package