Typehint Colour.__init__ parameter
This commit is contained in:
@@ -78,7 +78,7 @@ class Colour:
|
|||||||
|
|
||||||
__slots__ = ('value',)
|
__slots__ = ('value',)
|
||||||
|
|
||||||
def __init__(self, value):
|
def __init__(self, value: int):
|
||||||
if not isinstance(value, int):
|
if not isinstance(value, int):
|
||||||
raise TypeError(f'Expected int parameter, received {value.__class__.__name__} instead.')
|
raise TypeError(f'Expected int parameter, received {value.__class__.__name__} instead.')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user