MCPcopy Create free account
hub / github.com/SplootCode/splootcode / short_doc

Function short_doc

python/module_loader.py:6–22  ·  view source on GitHub ↗
(doc)

Source from the content-addressed store, hash-verified

4
5
6def short_doc(doc):
7 if not doc:
8 return ''
9 short = doc
10 if '.' in doc and 10 < doc.index('.') < 100:
11 short = doc.split('.')[0] + '.'
12 elif '\n' in doc and doc.index('\n') < 100:
13 short = doc.split('\n')[0]
14 elif len(doc) > 140:
15 short = doc[:97] + '...'
16
17 lines = doc.split('\n')
18 if '->' in short and len(lines) > 2:
19 remainder = '\n'.join(lines[1:])
20 return short_doc(remainder.strip())
21
22 return short
23
24def get_method_params(thing):
25 params = []

Callers 2

get_value_dataFunction · 0.85
get_type_dataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected