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 3aef21d commit e4611e2Copy full SHA for e4611e2
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