2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

tools/short_format: display booleans directly

This commit is contained in:
Sebastien Bourdeauducq 2015-10-18 13:31:36 +08:00
parent b9c1d3ef12
commit d7b41207da

View File

@ -49,7 +49,7 @@ def short_format(v):
if v is None:
return "None"
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)
elif t is str:
return "\"" + elide(v, 15) + "\""