From ff22fd1e0367bdcb980e67e375305e1eb73f9cd1 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Wed, 24 Jan 2024 20:11:08 +0100 Subject: [PATCH] Remove the load_profile warning by move it to front (#599) The problem is introduced by #593, where I move the load_profile to after the import of AWB. --- .pre-commit-config.yaml | 2 ++ qe.ipynb | 29 +++++++++++------------------ 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 70b59b910..111c1ea3d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,6 +32,8 @@ repos: - id: nbqa-isort args: [--profile=black] - id: nbqa-ruff + # suppress E402 + args: [--ignore=E402] - repo: https://github.com/kynan/nbstripout rev: 0.6.1 diff --git a/qe.ipynb b/qe.ipynb index dbb706798..12c25b9eb 100644 --- a/qe.ipynb +++ b/qe.ipynb @@ -13,6 +13,17 @@ "document.title='AiiDAlab QE app'" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from aiida import load_profile\n", + "\n", + "load_profile(); # noqa: E402" + ] + }, { "cell_type": "code", "execution_count": null, @@ -39,24 +50,6 @@ "from aiidalab_qe.version import __version__" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from aiida import load_profile\n", - "\n", - "load_profile();" - ] - }, { "cell_type": "code", "execution_count": null,