mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Install pyright from PyPI (#11575)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user