Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions mypy/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2398,12 +2398,39 @@ def skipping_ancestor(manager: BuildManager, id: str, path: str, ancestor_for: '
severity='note', only_once=True)


def log_configuration(manager: BuildManager) -> None:
"""Output useful configuration information to LOG and TRACE"""

manager.log()
configuration_vars = (
("Mypy Version", __version__),
("Config File", (manager.options.config_file or "Default")),
("Configured Executable", manager.options.python_executable),
("Current Executable", sys.executable),
("Cache Dir", manager.options.cache_dir),
)

for conf_name, conf_value in configuration_vars:
manager.log("{:24}{}".format(conf_name + ":", conf_value))

# Complete list of searched paths can get very long, put them under TRACE
for path_type, paths in manager.search_paths._asdict().items():
if not paths:
manager.trace("No %s" % path_type)
continue

manager.trace("%s:" % path_type)

for pth in paths:
manager.trace(" %s" % pth)


# The driver


def dispatch(sources: List[BuildSource], manager: BuildManager) -> Graph:
manager.log()
manager.log("Mypy version %s" % __version__)
log_configuration(manager)

t0 = time.time()
graph = load_graph(sources, manager)

Expand Down