]> jfr.im git - dlqueue.git/blame - venv/lib/python3.11/site-packages/pip/_vendor/rich/diagnose.py
init: venv aand flask
[dlqueue.git] / venv / lib / python3.11 / site-packages / pip / _vendor / rich / diagnose.py
CommitLineData
e0df8241
JR
1import os
2import platform
3
4from pip._vendor.rich import inspect
5from pip._vendor.rich.console import Console, get_windows_console_features
6from pip._vendor.rich.panel import Panel
7from pip._vendor.rich.pretty import Pretty
8
9
10def report() -> None: # pragma: no cover
11 """Print a report to the terminal with debugging information"""
12 console = Console()
13 inspect(console)
14 features = get_windows_console_features()
15 inspect(features)
16
17 env_names = (
18 "TERM",
19 "COLORTERM",
20 "CLICOLOR",
21 "NO_COLOR",
22 "TERM_PROGRAM",
23 "COLUMNS",
24 "LINES",
25 "JUPYTER_COLUMNS",
26 "JUPYTER_LINES",
27 "JPY_PARENT_PID",
28 "VSCODE_VERBOSE_LOGGING",
29 )
30 env = {name: os.getenv(name) for name in env_names}
31 console.print(Panel.fit((Pretty(env)), title="[b]Environment Variables"))
32
33 console.print(f'platform="{platform.system()}"')
34
35
36if __name__ == "__main__": # pragma: no cover
37 report()