fix pre-commit errors (#2501)
This commit is contained in:
@@ -75,14 +75,16 @@ def setup_mcp_config() -> str:
|
|||||||
try:
|
try:
|
||||||
version_output = os.popen(f"{python_path} --version").read().strip()
|
version_output = os.popen(f"{python_path} --version").read().strip()
|
||||||
version_str = version_output.split()[1] # Gets the version number part
|
version_str = version_output.split()[1] # Gets the version number part
|
||||||
major, minor = map(int, version_str.split('.')[:2])
|
major, minor = map(int, version_str.split(".")[:2])
|
||||||
if major == 3 and minor >= 11:
|
if major == 3 and minor >= 11:
|
||||||
python_paths.append((python_cmd, python_path))
|
python_paths.append((python_cmd, python_path))
|
||||||
except (IndexError, ValueError):
|
except (IndexError, ValueError):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not python_paths:
|
if not python_paths:
|
||||||
console.print("[red]Error: Could not find any Python 3.11 or higher installation. Please install Python 3.11 or higher first.[/red]")
|
console.print(
|
||||||
|
"[red]Error: Could not find any Python 3.11 or higher installation. Please install Python 3.11 or higher first.[/red]"
|
||||||
|
)
|
||||||
path_to_env = Prompt.ask(
|
path_to_env = Prompt.ask(
|
||||||
"Enter the full path to your Python 3.11+ environment. For example in MacOS if you installed it using Homebrew, it would be [cyan]/opt/homebrew/bin/python3.11[/cyan] or [cyan]/opt/homebrew/bin/python3.12[/cyan]"
|
"Enter the full path to your Python 3.11+ environment. For example in MacOS if you installed it using Homebrew, it would be [cyan]/opt/homebrew/bin/python3.11[/cyan] or [cyan]/opt/homebrew/bin/python3.12[/cyan]"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user