summaryrefslogtreecommitdiff
path: root/venv/lib/python3.11/site-packages/rich/diagnose.py
diff options
context:
space:
mode:
Diffstat (limited to 'venv/lib/python3.11/site-packages/rich/diagnose.py')
-rw-r--r--venv/lib/python3.11/site-packages/rich/diagnose.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/venv/lib/python3.11/site-packages/rich/diagnose.py b/venv/lib/python3.11/site-packages/rich/diagnose.py
new file mode 100644
index 0000000..91e55bd
--- /dev/null
+++ b/venv/lib/python3.11/site-packages/rich/diagnose.py
@@ -0,0 +1,37 @@
+import os
+import platform
+
+from rich import inspect
+from rich.console import Console, get_windows_console_features
+from rich.panel import Panel
+from rich.pretty import Pretty
+
+
+def report() -> None: # pragma: no cover
+ """Print a report to the terminal with debugging information"""
+ console = Console()
+ inspect(console)
+ features = get_windows_console_features()
+ inspect(features)
+
+ env_names = (
+ "TERM",
+ "COLORTERM",
+ "CLICOLOR",
+ "NO_COLOR",
+ "TERM_PROGRAM",
+ "COLUMNS",
+ "LINES",
+ "JUPYTER_COLUMNS",
+ "JUPYTER_LINES",
+ "JPY_PARENT_PID",
+ "VSCODE_VERBOSE_LOGGING",
+ )
+ env = {name: os.getenv(name) for name in env_names}
+ console.print(Panel.fit((Pretty(env)), title="[b]Environment Variables"))
+
+ console.print(f'platform="{platform.system()}"')
+
+
+if __name__ == "__main__": # pragma: no cover
+ report()