forked from M-Labs/artiq
tools/short_format: display booleans directly
This commit is contained in:
parent
b9c1d3ef12
commit
d7b41207da
|
@ -49,7 +49,7 @@ def short_format(v):
|
||||||
if v is None:
|
if v is None:
|
||||||
return "None"
|
return "None"
|
||||||
t = type(v)
|
t = type(v)
|
||||||
if np.issubdtype(t, int) or np.issubdtype(t, float):
|
if t is bool or np.issubdtype(t, int) or np.issubdtype(t, float):
|
||||||
return str(v)
|
return str(v)
|
||||||
elif t is str:
|
elif t is str:
|
||||||
return "\"" + elide(v, 15) + "\""
|
return "\"" + elide(v, 15) + "\""
|
||||||
|
|
Loading…
Reference in New Issue