From bd13b274c6c97a6e72649393daccc9a9d0563bd2 Mon Sep 17 00:00:00 2001 From: Florian M Date: Thu, 2 Nov 2023 19:44:49 +0100 Subject: [PATCH] python 3.8 compatibility maybe? --- webknossos/webknossos/client/apiclient/_serialization.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webknossos/webknossos/client/apiclient/_serialization.py b/webknossos/webknossos/client/apiclient/_serialization.py index 54064c190..f2a50c6c9 100644 --- a/webknossos/webknossos/client/apiclient/_serialization.py +++ b/webknossos/webknossos/client/apiclient/_serialization.py @@ -1,4 +1,4 @@ -from typing import Any, Callable, Dict, Mapping, Type, TypeVar, cast +from typing import Any, Callable, Dict, Mapping, Type, TypeVar import cattrs from attrs import AttrsInstance @@ -24,7 +24,7 @@ def attr_to_camel_case_structure(cl: Type[T]) -> Callable[[Mapping[str, Any], An **{ a.name: cattrs.gen.override(rename=snake_to_camel_case(a.name)) # https://github.com/python/mypy/issues/16254 - for a in attr_fields(cast(type[AttrsInstance], cl)) # type: ignore[misc] + for a in attr_fields(cl) # type: ignore[arg-type,misc] }, ) @@ -36,7 +36,7 @@ def attr_to_camel_case_unstructure(cl: Type[T]) -> Callable[[T], Dict[str, Any]] **{ a.name: cattrs.gen.override(rename=snake_to_camel_case(a.name)) # https://github.com/python/mypy/issues/16254 - for a in attr_fields(cast(type[AttrsInstance], cl)) # type: ignore[misc] + for a in attr_fields(cl) # type: ignore[arg-type,misc] }, )