From c4adbec90340c3fdd3bee06659e79e56472a344b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 01:36:29 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/aiida/common/lang.py | 4 +--- src/aiida/manage/configuration/profile.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/aiida/common/lang.py b/src/aiida/common/lang.py index 251db3e6fd..ec9fb45ddb 100644 --- a/src/aiida/common/lang.py +++ b/src/aiida/common/lang.py @@ -23,9 +23,7 @@ def isidentifier(identifier): return identifier.isidentifier() and not keyword.iskeyword(identifier) -def type_check( - what: object, of_type, msg: str | None = None, allow_none: bool = False -) -> object | None: +def type_check(what, of_type, msg=None, allow_none=False): """Verify that object 'what' is of type 'of_type' and if not the case, raise a TypeError. :param what: the object to check diff --git a/src/aiida/manage/configuration/profile.py b/src/aiida/manage/configuration/profile.py index 875d89b4e2..d1d586f8b3 100644 --- a/src/aiida/manage/configuration/profile.py +++ b/src/aiida/manage/configuration/profile.py @@ -14,7 +14,7 @@ import pathlib from collections import abc from copy import deepcopy -from typing import TYPE_CHECKING, Any, Literal, cast +from typing import TYPE_CHECKING, Any, cast from aiida.common import exceptions from aiida.common.lang import type_check