File tree Expand file tree Collapse file tree
src/translate_messages/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ license-files = [
1818 " docs/LICENSE.md" ,
1919]
2020dependencies = [
21- " colorama>=0.4.6,<1.0.0" ,
21+ " colorama>=0.4.6,<1.0.0 ; platform_system == 'Windows' " ,
2222]
2323requires-python = " >=3.6,<4.0"
2424keywords = [
Original file line number Diff line number Diff line change 11import os , sys
22from types import SimpleNamespace as sns
3- import colorama
3+ if sys . platform == 'win32' : import colorama ; colorama . init () # enable ANSI color support
44
55try :
66 terminal_width = os .get_terminal_size ()[0 ]
1818 dy = '\x1b [33m' , # dark yellow
1919 gry = '\x1b [90m' # gray
2020)
21- colorama .init () # enable compatibility w/ Windows
2221
2322def data (msg , * args , ** kwargs ):
2423 print (f'\n { colors .bw } { msg .format (* args , ** kwargs )} { colors .nc } ' )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ license-files = [
1818 " docs/LICENSE.md" ,
1919]
2020dependencies = [
21- " colorama>=0.4.6,<1.0.0" ,
21+ " colorama>=0.4.6,<1.0.0 ; platform_system == 'Windows' " ,
2222 " requests>=2.32.0,<3.0.0" ,
2323 " translate>=3.8.0,<4.0.0" ,
2424]
Original file line number Diff line number Diff line change 11import os , sys
22from types import SimpleNamespace as sns
3- import colorama
3+ if sys . platform == 'win32' : import colorama ; colorama . init () # enable ANSI color support
44
55try :
66 terminal_width = os .get_terminal_size ()[0 ]
1818 dy = '\x1b [33m' , # dark yellow
1919 gry = '\x1b [90m' # gray
2020)
21- colorama .init () # enable compatibility w/ Windows
2221
2322def data (msg , * args , ** kwargs ):
2423 print (f'\n { colors .bw } { msg .format (* args , ** kwargs )} { colors .nc } ' )
You can’t perform that action at this time.
0 commit comments