Install pyright from PyPI (#11575)

This commit is contained in:
Sebastian Rittau
2024-03-16 14:14:31 +01:00
committed by GitHub
parent 0ad1501a99
commit a8997209fb
8 changed files with 32 additions and 30 deletions

View File

@@ -5,7 +5,7 @@ from __future__ import annotations
import os
import re
import sys
from collections.abc import Mapping
from collections.abc import Iterable, Mapping
from functools import lru_cache
from pathlib import Path
from typing import Any, Final, NamedTuple
@@ -38,6 +38,12 @@ def strip_comments(text: str) -> str:
# ====================================================================
def print_command(cmd: str | Iterable[str]) -> None:
if not isinstance(cmd, str):
cmd = " ".join(cmd)
print(colored(f"Running: {cmd}", "blue"))
def print_error(error: str, end: str = "\n", fix_path: tuple[str, str] = ("", "")) -> None:
error_split = error.split("\n")
old, new = fix_path