Skip to content

Commit 76b898d

Browse files
committed
Fix formatting: use f-strings for consistency
1 parent c2a2533 commit 76b898d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jupyter_server/services/contents/filemanager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def rename_file(self, old_path, new_path):
603603
except web.HTTPError:
604604
raise
605605
except FileNotFoundError:
606-
raise web.HTTPError(404, "File or directory does not exist: %s" % old_path)
606+
raise web.HTTPError(404, f"File or directory does not exist: {old_path}")
607607
except Exception as e:
608608
raise web.HTTPError(500, f"Unknown error renaming file: {old_path} {e}") from e
609609

@@ -1072,7 +1072,7 @@ async def rename_file(self, old_path, new_path):
10721072
except web.HTTPError:
10731073
raise
10741074
except FileNotFoundError:
1075-
raise web.HTTPError(404, "File or directory does not exist: %s" % old_path)
1075+
raise web.HTTPError(404, f"File or directory does not exist: {old_path}")
10761076
except Exception as e:
10771077
raise web.HTTPError(500, f"Unknown error renaming file: {old_path} {e}") from e
10781078

0 commit comments

Comments
 (0)