Skip to content

Conversation

jiasli
Copy link
Member

@jiasli jiasli commented Sep 17, 2021

As colorama is only initialized on Windows (#238), it should not be installed on Linux or MacOS.

self.enable_color = self._should_enable_color()
# Init colorama only in Windows legacy terminal
self._should_init_colorama = self.enable_color and os.name == 'nt' and not is_modern_terminal()
self._should_init_colorama = self.enable_color and sys.platform == 'win32' and not is_modern_terminal()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the same method as setup.py to detect system.

# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

from codecs import open
Copy link
Member Author

@jiasli jiasli Sep 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for Python 2 which has been dropped long time ago (#233).

@jiasli jiasli requested a review from evelyn-ys November 3, 2021 09:32
@jiasli
Copy link
Member Author

jiasli commented Nov 3, 2021

/azp run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants