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