Skip to content

Commit 62f7151

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent fbc4c44 commit 62f7151

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

jupyter_server_fileid/manager.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def _create(self, path: str) -> str:
317317

318318
if existing_id:
319319
return existing_id
320-
320+
321321
id = self._uuid()
322322
self.con.execute("INSERT INTO Files (id, path) VALUES (?, ?)", (id, path))
323323
return id
@@ -612,7 +612,6 @@ def _sync_file(self, path, stat_info):
612612
"SELECT id, path, crtime FROM Files WHERE ino = ?", (stat_info.ino,)
613613
).fetchone()
614614

615-
616615
# if ino is not in database, return None
617616
if src is None:
618617
return None
@@ -673,17 +672,17 @@ def _create(self, path, stat_info):
673672
dangerous and may throw a runtime error if the file is not guaranteed to
674673
have a unique `ino`.
675674
"""
676-
# If the path exists
675+
# If the path exists
677676
existing_id, ino = None, None
678677
row = self.con.execute("SELECT id, ino FROM Files WHERE path = ?", (path,)).fetchone()
679-
if row:
678+
if row:
680679
existing_id, ino = row
681680

682681
# If the file ID already exists and the current file matches our records
683-
# return the file ID instead of creating a new one.
682+
# return the file ID instead of creating a new one.
684683
if existing_id and stat_info.ino == ino:
685684
return existing_id
686-
685+
687686
id = self._uuid()
688687
self.con.execute(
689688
"INSERT INTO Files (id, path, ino, crtime, mtime, is_dir) VALUES (?, ?, ?, ?, ?, ?)",

0 commit comments

Comments
 (0)