diff --git a/packages/jupyter-ai/jupyter_ai/document_loaders/directory.py b/packages/jupyter-ai/jupyter_ai/document_loaders/directory.py index 130695283..c8af71d84 100644 --- a/packages/jupyter-ai/jupyter_ai/document_loaders/directory.py +++ b/packages/jupyter-ai/jupyter_ai/document_loaders/directory.py @@ -30,7 +30,7 @@ def arxiv_to_text(id: str, output_dir: str) -> str: output path to the downloaded TeX file """ - import arxiv # type:ignore[import-not-found] + import arxiv # type:ignore[import-not-found,import-untyped] outfile = f"{id}-{datetime.now():%Y-%m-%d-%H-%M}.tex" download_filename = "downloaded-paper.tar.gz" diff --git a/packages/jupyter-ai/jupyter_ai/handlers.py b/packages/jupyter-ai/jupyter_ai/handlers.py index 9de16f9eb..7c4f16e63 100644 --- a/packages/jupyter-ai/jupyter_ai/handlers.py +++ b/packages/jupyter-ai/jupyter_ai/handlers.py @@ -143,6 +143,7 @@ def get_chat_user(self) -> ChatUser: environment.""" # Get a dictionary of all loaded extensions. # (`serverapp` is a property on all `JupyterHandler` subclasses) + assert self.serverapp extensions = self.serverapp.extension_manager.extensions collaborative = ( "jupyter_collaboration" in extensions @@ -512,7 +513,7 @@ def post(self): class ApiKeysHandler(BaseAPIHandler): @property - def config_manager(self) -> ConfigManager: + def config_manager(self) -> ConfigManager: # type:ignore[override] return self.settings["jai_config_manager"] @web.authenticated @@ -527,7 +528,7 @@ class SlashCommandsInfoHandler(BaseAPIHandler): """List slash commands that are currently available to the user.""" @property - def config_manager(self) -> ConfigManager: + def config_manager(self) -> ConfigManager: # type:ignore[override] return self.settings["jai_config_manager"] @property