Skip to content

Commit 4fb4e77

Browse files
committed
chore: 移除 nbstripout 相关配置和安装逻辑,使用lint-staged
1 parent 21ad0ae commit 4fb4e77

2 files changed

Lines changed: 0 additions & 26 deletions

File tree

‎.gitattributes‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
*.ps1 text eol=lf
22

3-
*.ipynb filter=nbstripout
4-
*.zpln filter=nbstripout
5-
*.ipynb diff=ipynb

‎install.ps1‎

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -228,29 +228,6 @@ function Install-NbStripout {
228228
else {
229229
Write-Host "✓ nbstripout 已安装在系统中" -ForegroundColor Green
230230
}
231-
232-
# 2. 配置当前仓库的 git filter
233-
if (Test-Path ".git") {
234-
# 使用 nbstripout --is-installed 检查是否已配置
235-
# 注意:该命令在未配置时返回退出码 1
236-
$null = nbstripout --is-installed 2>$null
237-
if ($LASTEXITCODE -eq 0) {
238-
Write-Host "✓ nbstripout 已在当前仓库配置" -ForegroundColor Green
239-
}
240-
else {
241-
Write-Host "正在为当前仓库配置 nbstripout git filter..." -ForegroundColor Cyan
242-
nbstripout --install --attributes .gitattributes
243-
if ($LASTEXITCODE -eq 0) {
244-
Write-Host "✓ nbstripout 配置完成 (.gitattributes)" -ForegroundColor Green
245-
}
246-
else {
247-
Write-Warning "nbstripout --install 执行失败"
248-
}
249-
}
250-
}
251-
else {
252-
Write-Warning "当前目录不是 Git 仓库根目录,跳过 nbstripout --install 配置"
253-
}
254231
}
255232

256233
# --- 主执行逻辑 ---

0 commit comments

Comments
 (0)