diff --git a/rich/console.py b/rich/console.py index 386d56eb..6acefc28 100644 --- a/rich/console.py +++ b/rich/console.py @@ -10,10 +10,10 @@ from dataclasses import dataclass, field from datetime import datetime from functools import wraps from getpass import getpass +from inspect import isclass from itertools import islice from time import monotonic from types import FrameType, TracebackType -from inspect import isclass from typing import ( IO, TYPE_CHECKING, @@ -28,12 +28,10 @@ from typing import ( TextIO, Tuple, Type, - Tuple, Union, cast, ) - if sys.version_info >= (3, 8): from typing import Literal, Protocol, runtime_checkable else: @@ -43,7 +41,6 @@ else: runtime_checkable, ) # pragma: no cover - from . import errors, themes from ._emoji_replace import _emoji_replace from ._log_render import FormatTimeCallable, LogRender