Fix CI, use new termcolor version (#10079)

This commit is contained in:
Nikita Sobolev
2023-04-24 17:17:23 +03:00
committed by GitHub
parent 1b68adee9a
commit 2bfb6d8212
3 changed files with 7 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ pre-commit-hooks==4.4.0 # must match .pre-commit-confi
pycln==2.1.3 # must match .pre-commit-config.yaml
pytype==2023.4.11; platform_system != "Windows" and python_version < "3.11"
pyyaml==6.0
termcolor>=2
termcolor>=2.3
tomli==2.0.1
tomlkit==0.11.7
types-pyyaml>=6.0.12.7

View File

@@ -7,14 +7,14 @@ import os
import re
import subprocess
import sys
from collections.abc import Iterable
from pathlib import Path
from typing import Any
try:
from termcolor import colored
from termcolor import colored # pyright: ignore[reportGeneralTypeIssues]
except ImportError:
def colored(text: str, color: str | None = None, on_color: str | None = None, attrs: Iterable[str] | None = None) -> str:
def colored(text: str, color: str | None = None, **kwargs: Any) -> str: # type: ignore[misc]
return text

View File

@@ -7,19 +7,18 @@ import re
import subprocess
import sys
import venv
from collections.abc import Iterable
from functools import lru_cache
from pathlib import Path
from typing import NamedTuple
from typing import Any, NamedTuple
from typing_extensions import Annotated
import pathspec
try:
from termcolor import colored as colored
from termcolor import colored as colored # pyright: ignore[reportGeneralTypeIssues]
except ImportError:
def colored(text: str, color: str | None = None, on_color: str | None = None, attrs: Iterable[str] | None = None) -> str:
def colored(text: str, color: str | None = None, **kwargs: Any) -> str: # type: ignore[misc]
return text