We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TextIOWrapper.reconfigure
1 parent 12280d0 commit 821fa56Copy full SHA for 821fa56
commitizen/out.py
@@ -1,10 +1,11 @@
1
+import io
2
import sys
3
4
from termcolor import colored
5
6
if sys.platform == "win32":
- # See: https://github.com/python/typeshed/issues/3049
7
- sys.stdout.reconfigure(encoding="utf-8") # type: ignore
+ if isinstance(sys.stdout, io.TextIOWrapper) and sys.version_info >= (3, 7):
8
+ sys.stdout.reconfigure(encoding="utf-8")
9
10
11
def write(value: str, *args) -> None:
0 commit comments