support for no color curses

This commit is contained in:
doman 2022-04-13 14:26:47 +02:00
parent 270266b5c7
commit 8c00a8d8c9
3 changed files with 9 additions and 3 deletions

View file

@ -6,9 +6,15 @@ class Interface:
self.application = application
self.components = components
self.no_cursor = no_cursor
self.colors = True
def init_colors(self):
assert curses.has_colors()
try:
assert curses.has_colors()
except AssertionError:
self.colors = False
return
curses.start_color()
curses.use_default_colors()

View file

@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.0.5
current_version = 2.0.6
[wheel]
universal = 1

View file

@ -9,7 +9,7 @@ with open("requirements.txt", "r", encoding="utf-8") as fh:
setup(
name="fasttyper",
version="2.0.5",
version="2.0.6",
author="Piotr Domanski",
author_email="pi.domanski@gmail.com",
description="Minimalistic typing exercise",