forked from clan/clan-core
add assertion if FlakeId has wrong value
This commit is contained in:
parent
c44a99e304
commit
d9c5f16e05
@ -12,6 +12,11 @@ class FlakeId:
|
|||||||
# FIXME: this is such a footgun if you accidnetally pass a string
|
# FIXME: this is such a footgun if you accidnetally pass a string
|
||||||
_value: str | Path
|
_value: str | Path
|
||||||
|
|
||||||
|
def __post_init__(self) -> None:
|
||||||
|
assert isinstance(
|
||||||
|
self._value, str | Path
|
||||||
|
), f"Flake {self._value} has an invalid type: {type(self._value)}"
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return str(
|
return str(
|
||||||
self._value
|
self._value
|
||||||
|
Loading…
Reference in New Issue
Block a user