Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 17, 2022
1 parent 9cd2d38 commit 1ec029f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jupyter_server_ydoc/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ def get_file_info(self) -> Tuple[str, str, str]:
raise RuntimeError(f"File {self.room.document.path} cannot be found anymore")
assert file_path is not None
if file_path != self.room.document.path:
self.log.debug("File with ID %s was moved from %s to %s", self.room.document.path, file_path)
self.log.debug(
"File with ID %s was moved from %s to %s", self.room.document.path, file_path
)
self.room.document.path = file_path
return file_format, file_type, file_path

Expand Down Expand Up @@ -226,7 +228,9 @@ async def maybe_load_document(self):
file_format, file_type, file_path = self.get_file_info()
async with self.lock:
model = await ensure_async(
self.contents_manager.get(file_path, content=False, type=file_type, format=file_format)
self.contents_manager.get(
file_path, content=False, type=file_type, format=file_format
)
)
# do nothing if the file was saved by us
if self.last_modified < model["last_modified"]:
Expand Down

0 comments on commit 1ec029f

Please sign in to comment.