Skip to content

Commit

Permalink
Fix Rich compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek authored Aug 3, 2022
1 parent 12cc5fb commit c1a4139
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion isort/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
colorama_unavailable = True
else:
colorama_unavailable = False
colorama.init(strip=False)


ADDED_LINE_PATTERN = re.compile(r"\+[^+]")
Expand Down Expand Up @@ -151,6 +150,7 @@ def create_terminal_printer(
print(no_colorama_message, file=sys.stderr)
sys.exit(1)

colorama.init(strip=False)
return (
ColoramaPrinter(error, success, output) if color else BasicPrinter(error, success, output)
)

0 comments on commit c1a4139

Please sign in to comment.