[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-06-26 05:35:38 +00:00
commit 2eba8a4976

View file

@ -156,12 +156,11 @@ def build_view(
rel = os.path.relpath(target, folder) # ../../unsloth-notebooks/nb/<file>
try:
if os.path.islink(link):
os.remove(link) # replace our own stale symlink
os.remove(link) # replace our own stale symlink
elif os.path.exists(link):
# a real user file/dir already occupies this name -- never
# clobber it; leave it and skip linking this notebook.
print(f"[unsloth-nb] view: keep user file, skip link {fname}",
file = sys.stderr)
print(f"[unsloth-nb] view: keep user file, skip link {fname}", file = sys.stderr)
continue
os.symlink(rel, link)
n_links += 1