MCPcopy Index your code
hub / github.com/python/mypy / log_configuration

Function log_configuration

mypy/build.py:4015–4051  ·  view source on GitHub ↗

Output useful configuration information to LOG and TRACE

(manager: BuildManager, sources: list[BuildSource])

Source from the content-addressed store, hash-verified

4013
4014
4015def log_configuration(manager: BuildManager, sources: list[BuildSource]) -> None:
4016 """Output useful configuration information to LOG and TRACE"""
4017
4018 if not manager.logging_enabled:
4019 return
4020
4021 config_file = manager.options.config_file
4022 if config_file:
4023 config_file = os.path.abspath(config_file)
4024
4025 manager.log()
4026 configuration_vars = [
4027 ("Mypy Version", __version__),
4028 ("Config File", (config_file or "Default")),
4029 ("Configured Executable", manager.options.python_executable or "None"),
4030 ("Current Executable", sys.executable),
4031 ("Cache Dir", manager.options.cache_dir),
4032 ("Compiled", str(not __file__.endswith(".py"))),
4033 ("Exclude", manager.options.exclude),
4034 ]
4035
4036 for conf_name, conf_value in configuration_vars:
4037 manager.log(f"{conf_name + ':':24}{conf_value}")
4038
4039 for source in sources:
4040 manager.log(f"{'Found source:':24}{source}")
4041
4042 # Complete list of searched paths can get very long, put them under TRACE
4043 for path_type, paths in manager.search_paths.asdict().items():
4044 if not paths:
4045 manager.trace(f"No {path_type}")
4046 continue
4047
4048 manager.trace(f"{path_type}:")
4049
4050 for pth in paths:
4051 manager.trace(f" {pth}")
4052
4053
4054# The driver

Callers 1

dispatchFunction · 0.85

Calls 6

strClass · 0.85
asdictMethod · 0.80
traceMethod · 0.80
logMethod · 0.45
endswithMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…