[config] Color, meme problème, valeur none pas gérée

This commit is contained in:
Louis Chauvet 2020-04-25 01:04:17 +02:00
parent 36eef81f87
commit 80e31703b8
Signed by: fomys
GPG Key ID: 1ECA046A9615ABA0

View File

@ -14,9 +14,9 @@ class Color(BaseType):
:Basic usage: :Basic usage:
>>> Color() >>> Color()
<config_types.Color object with value None> <config_types.Color object with value 0>
""" """
self.value = None self.value = 0
def check_value(self, value: int) -> bool: def check_value(self, value: int) -> bool:
""" """
@ -89,6 +89,7 @@ class Color(BaseType):
>>> my_color = Color() >>> my_color = Color()
>>> my_color.to_save() >>> my_color.to_save()
0
>>> my_color.set(34) >>> my_color.set(34)
>>> my_color.to_save() >>> my_color.to_save()
34 34