@@ -66,7 +66,7 @@ def is_url(url: str) -> bool:
6666class LabHandler (ExtensionHandlerJinjaMixin , ExtensionHandlerMixin , JupyterHandler ):
6767 """Render the JupyterLab View."""
6868
69- @lru_cache () # noqa
69+ @lru_cache # noqa: B019
7070 def get_page_config (self ) -> dict [str , Any ]:
7171 """Construct the page config object"""
7272 self .application .store_id = getattr ( # type:ignore[attr-defined]
@@ -105,7 +105,7 @@ def get_page_config(self) -> dict[str, Any]:
105105 .relative_to (server_root )
106106 .as_posix ()
107107 )
108- except Exception : # noqa S110
108+ except Exception : # noqa: S110
109109 pass
110110 # JupyterLab relies on an unset/default path being "/"
111111 page_config ["preferredPath" ] = preferred_path or "/"
@@ -176,15 +176,15 @@ def get(
176176class NotFoundHandler (LabHandler ):
177177 """A handler for page not found."""
178178
179- @lru_cache () # noqa
179+ @lru_cache # noqa: B019
180180 def get_page_config (self ) -> dict [str , Any ]:
181181 """Get the page config."""
182182 page_config = super ().get_page_config ()
183183 page_config ["notFoundUrl" ] = self .request .path
184184 return page_config
185185
186186
187- def add_handlers (handlers : list [Any ], extension_app : LabServerApp ) -> None : # noqa
187+ def add_handlers (handlers : list [Any ], extension_app : LabServerApp ) -> None :
188188 """Add the appropriate handlers to the web app."""
189189 # Normalize directories.
190190 for name in LabConfig .class_trait_names ():
@@ -272,8 +272,9 @@ def add_handlers(handlers: list[Any], extension_app: LabServerApp) -> None: # n
272272 allowed_extensions_uris : str = settings_config .get ("allowed_extensions_uris" , "" )
273273
274274 if (blocked_extensions_uris ) and (allowed_extensions_uris ):
275- warnings .warn ( # noqa B028
276- "Simultaneous blocked_extensions_uris and allowed_extensions_uris is not supported. Please define only one of those."
275+ warnings .warn (
276+ "Simultaneous blocked_extensions_uris and allowed_extensions_uris is not supported. Please define only one of those." ,
277+ stacklevel = 2 ,
277278 )
278279 import sys
279280
@@ -339,7 +340,7 @@ def add_handlers(handlers: list[Any], extension_app: LabServerApp) -> None: # n
339340 handlers .append ((fallthrough_url , NotFoundHandler ))
340341
341342
342- def _camelCase (base : str ) -> str : # noqa
343+ def _camelCase (base : str ) -> str :
343344 """Convert a string to camelCase.
344345 https://stackoverflow.com/a/20744956
345346 """
0 commit comments