From 59d7923d5a9a07191d2c04ca652e5bb6d074eb78 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Thu, 14 Nov 2024 03:12:52 +0100 Subject: [PATCH] Type for ipython var [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/aiida/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/aiida/__init__.py b/src/aiida/__init__.py index 75215240d7..6b3c627a55 100644 --- a/src/aiida/__init__.py +++ b/src/aiida/__init__.py @@ -19,8 +19,15 @@ More information at http://www.aiida.net """ +from __future__ import annotations + +from typing import TYPE_CHECKING + from aiida.manage.configuration import load_profile +if TYPE_CHECKING: + from IPython.core.interactiveshell import InteractiveShell + __copyright__ = ( 'Copyright (c), This file is part of the AiiDA platform. ' 'For further information please visit http://www.aiida.net/. All rights reserved.' @@ -94,7 +101,7 @@ def get_file_header(comment_char: str = '# ') -> str: return '\n'.join(f'{comment_char}{line}' for line in lines) -def load_ipython_extension(ipython): +def load_ipython_extension(ipython: InteractiveShell): """Load the AiiDA IPython extension, using ``%load_ext aiida``.""" from .tools.ipython.ipython_magics import AiiDALoaderMagics