Refactor into a Library Format #1
@@ -50,7 +50,10 @@ class ColourValue(str):
|
|||||||
else:
|
else:
|
||||||
name = ""
|
name = ""
|
||||||
|
|
||||||
return name # ty:ignore[invalid-return-type]
|
assert isinstance(name, str), \
|
||||||
|
TypeError(f"`name` should be an instance of `str` not `{type(name)}`")
|
||||||
|
|
||||||
|
return name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hex(self) -> str:
|
def hex(self) -> str:
|
||||||
|
|||||||
Reference in New Issue
Block a user