Skip to content

Commit

Permalink
Ensure legacy Windows imports only happen on legacy Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Mar 1, 2022
1 parent 18614b5 commit a924514
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rich/console.py
Expand Up @@ -31,8 +31,6 @@
cast,
)

from rich._win32_console import LegacyWindowsTerm

if sys.version_info >= (3, 8):
from typing import Literal, Protocol, runtime_checkable
else:
Expand Down Expand Up @@ -1913,6 +1911,7 @@ def _check_buffer(self) -> None:
else:
if WINDOWS:
if self.legacy_windows:
from rich._win32_console import LegacyWindowsTerm
from rich._windows_renderer import legacy_windows_render

legacy_windows_render(
Expand Down

0 comments on commit a924514

Please sign in to comment.