✨ feat(vscode): 代码阅读支持库规则,内置 SQLAlchemy 模型类显示成数据表卡片
This commit is contained in:
1 parent
32be7d54b6
commit
5ece24cef9
26 files changed
+1768
-81
No files matched your search
@@ -4,7 +4,7 @@ import { toBlockViews } from '../../../src/codeReader/blockView'
|
||||
import { createPythonAdapter } from '../../../src/codeReader/languages/python'
|
||||
import { WASM_DIR, withBlocks } from '../../../src/codeReader/testSupport'
|
||||
import { pythonZhTranslator } from '../../../src/codeReader/translators/pythonZh'
|
||||
import { subRowsLayout, tableCells } from './subRows'
|
||||
import { subRowsLayout, tableCells, tableTemplate } from './subRows'
|
||||
|
||||
const x = { text: 'x', role: 'variable' as const, offset: 4 }
|
||||
|
||||
@@ -22,6 +22,11 @@ describe('属性行下面的子行怎么排', () => {
|
||||
expect(tableCells({ cells: [[x], [x], [x], [x]] }, ['名称', '类型'])).toEqual([[x], [x]])
|
||||
})
|
||||
|
||||
it('表格的列宽按整列内容定:前几列最宽到不换行,最后一列分剩下的、至少留一段', () => {
|
||||
expect(tableTemplate(2)).toBe('minmax(0, max-content) minmax(min(20%, 8em), 1fr)')
|
||||
expect(tableTemplate(4)).toBe('minmax(0, max-content) minmax(0, max-content) minmax(0, max-content) minmax(min(20%, 8em), 1fr)')
|
||||
})
|
||||
|
||||
it('真实的 Python 函数:输入参数排成表格,导入项、字典的各项排成列表', async () => {
|
||||
const source = [
|
||||
'from m import a',
|
||||
|
||||
Reference in new issue
Block a user