MCPcopy Create free account
hub / github.com/ActiveState/code / quoted

Function quoted

recipes/Python/546532_PyChecker_postprocessor/recipe-546532.py:238–244  ·  view source on GitHub ↗

Enquote text if needed.

(text)

Source from the content-addressed store, hash-verified

236
237
238def quoted(text):
239 '''Enquote text if needed.
240 '''
241 if len(text.split()) != 1:
242 return '"%s"' % (text,)
243 else:
244 return text
245
246
247def which(exe):

Callers 2

whichFunction · 0.85
runMethod · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected