Skip to content

Commit

Permalink
Merge pull request #1961 from ofek/patch-1
Browse files Browse the repository at this point in the history
Fix Rich compatibility
  • Loading branch information
timothycrosley committed Dec 11, 2022
2 parents e28f382 + c1a4139 commit b4d285c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion isort/format.py
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 b4d285c

Please sign in to comment.