(docString?: string)
| 16 | } from 'structured-pyright' |
| 17 | |
| 18 | export function getShortDoc(docString?: string) { |
| 19 | if (!docString) { |
| 20 | return '' |
| 21 | } |
| 22 | |
| 23 | const lines = docString.split('\n') |
| 24 | |
| 25 | let short = lines.find((line) => line.trim().length > 0) |
| 26 | if (!short) { |
| 27 | return '' |
| 28 | } |
| 29 | |
| 30 | if (short.length > 100) { |
| 31 | short = short.slice(0, 97) + '...' |
| 32 | } |
| 33 | |
| 34 | return short |
| 35 | } |
| 36 | |
| 37 | function pyrightParamsToAutocompleteFunctionArguments( |
| 38 | params: FunctionParameter[] |
no test coverage detected