diff --git a/requirements-tests.txt b/requirements-tests.txt index b811f62a1..2bcd6b0ec 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -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 diff --git a/scripts/runtests.py b/scripts/runtests.py index 165be142c..e5b38ef83 100644 --- a/scripts/runtests.py +++ b/scripts/runtests.py @@ -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 diff --git a/tests/utils.py b/tests/utils.py index f5a7a4cbf..7913bfaa1 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -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