Skip to content

Commit

Permalink
fix: support older versions of colorama
Browse files Browse the repository at this point in the history
  • Loading branch information
em230418 committed Nov 21, 2023
1 parent 007f830 commit 4eb2484
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion copier/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@

from .types import IntSeq

colorama.just_fix_windows_console()
try:
colorama_init = colorama.just_fix_windows_console
except AttributeError:
colorama_init = colorama.init

Check warning on line 25 in copier/tools.py

View check run for this annotation

Codecov / codecov/patch

copier/tools.py#L24-L25

Added lines #L24 - L25 were not covered by tests

colorama_init()


class Style:
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ copier = "copier.__main__:copier_app_run"

[tool.poetry.dependencies]
python = ">=3.8,<4.0" # HACK https://github.com/PyCQA/isort/issues/1945
colorama = ">=0.4.6"
colorama = ">=0.4.3"
decorator = ">=5.1.1"
dunamai = ">=1.7.0"
funcy = ">=1.17"
Expand Down

0 comments on commit 4eb2484

Please sign in to comment.