Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 821fa56

Browse files
fix(out.py): TextIOWrapper.reconfigure typing
See python/typeshed#3049
1 parent 12280d0 commit 821fa56

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎commitizen/out.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import io
12
import sys
23

34
from termcolor import colored
45

56
if sys.platform == "win32":
6-
# See: https://github.com/python/typeshed/issues/3049
7-
sys.stdout.reconfigure(encoding="utf-8")# type: ignore
7+
ifisinstance(sys.stdout, io.TextIOWrapper) andsys.version_info>= (3, 7):
8+
sys.stdout.reconfigure(encoding="utf-8")
89

910

1011
def write(value: str, *args) -> None:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /