Skip to content

Commit faf9297

Browse files
committed
Use noqa on root being redefined to avoid changing the logic
1 parent b8d5528 commit faf9297

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jupyter_server/base/handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,12 +1056,12 @@ def get_absolute_path(cls, roots: Sequence[str], path: str) -> str:
10561056
log().debug(f"Path {path} served from {abspath}")
10571057
return abspath
10581058

1059-
def validate_absolute_path(self, _root: str, absolute_path: str) -> str | None:
1059+
def validate_absolute_path(self, root: str, absolute_path: str) -> str | None:
10601060
"""check if the file should be served (raises 404, 403, etc.)"""
10611061
if not absolute_path:
10621062
raise web.HTTPError(404)
10631063

1064-
for root in self.root:
1064+
for root in self.root: # noqa: PLR1704
10651065
if (absolute_path + os.sep).startswith(root):
10661066
break
10671067

0 commit comments

Comments
 (0)