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