Skip to content

Commit

Permalink
Fix typings
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Sep 26, 2023
1 parent 5d16ab0 commit b5748a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions jupyter_server/auth/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,9 @@ def get_user(self, handler: JupyterHandler) -> User | None:

@property
def login_available(self):
return self.login_handler_class.get_login_available(
return self.login_handler_class.get_login_available( # type:ignore[attr-defined]
self.settings
) # type:ignore[attr-defined]
)

def should_check_origin(self, handler: JupyterHandler) -> bool:
"""Whether we should check origin."""
Expand All @@ -734,6 +734,6 @@ def validate_security(
self.log.critical(_i18n("Hint: run the following command to set a password"))
self.log.critical(_i18n("\t$ python -m jupyter_server.auth password"))
sys.exit(1)
return self.login_handler_class.validate_security(
return self.login_handler_class.validate_security( # type:ignore[attr-defined]
app, ssl_options
) # type:ignore[attr-defined]
)
8 changes: 4 additions & 4 deletions jupyter_server/serverapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1880,17 +1880,17 @@ def init_configurables(self):
self.gateway_config = GatewayClient.instance(parent=self)

if not issubclass(
self.kernel_manager_class, AsyncMappingKernelManager
): # type:ignore[arg-type]
self.kernel_manager_class, AsyncMappingKernelManager # type:ignore[arg-type]
):
warnings.warn(
"The synchronous MappingKernelManager class is deprecated and will not be supported in Jupyter Server 3.0",
DeprecationWarning,
stacklevel=2,
)

if not issubclass(
self.contents_manager_class, AsyncContentsManager
): # type:ignore[arg-type]
self.contents_manager_class, AsyncContentsManager # type:ignore[arg-type]
):
warnings.warn(
"The synchronous ContentsManager classes are deprecated and will not be supported in Jupyter Server 3.0",
DeprecationWarning,
Expand Down

0 comments on commit b5748a2

Please sign in to comment.