Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
60
def
strtrunc(s: Any, maxlen: int = 60) -> str:
61
s = str(s)
62
return
s[:(maxlen-3)]+
'...'
if
len(s) > maxlen
else
s
63
64
65
class
CLIError(Exception):
Callers
2
output
Function · 0.90
solvers
Function · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected