MCPcopy Create free account
hub / github.com/dwavesystems/dwave-cloud-client / strtrunc

Function strtrunc

dwave/cloud/utils/cli.py:60–62  ·  view source on GitHub ↗
(s: Any, maxlen: int = 60)

Source from the content-addressed store, hash-verified

58
59
60def strtrunc(s: Any, maxlen: int = 60) -> str:
61 s = str(s)
62 return s[:(maxlen-3)]+'...' if len(s) > maxlen else s
63
64
65class CLIError(Exception):

Callers 2

outputFunction · 0.90
solversFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected