[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
dde7a26483
commit
2eba8a4976
1 changed files with 2 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue