From 1f8709cea4ba46932ec62f56169fca629058ce4d Mon Sep 17 00:00:00 2001 From: Alexandru Fikl <alexfikl@gmail.com> Date: Fri, 29 Oct 2021 14:41:15 -0500 Subject: [PATCH] add type annotations to is_array_field --- arraycontext/container/dataclass.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arraycontext/container/dataclass.py b/arraycontext/container/dataclass.py index bf433f2..6549207 100644 --- a/arraycontext/container/dataclass.py +++ b/arraycontext/container/dataclass.py @@ -46,10 +46,10 @@ def dataclass_array_container(cls: type) -> type: whether an attribute is an array container, the declared attribute type is checked by the criteria from :func:`is_array_container_type`. """ - from dataclasses import is_dataclass + from dataclasses import is_dataclass, Field assert is_dataclass(cls) - def is_array_field(f): + def is_array_field(f: Field) -> bool: if __debug__: if not f.init: raise ValueError( -- GitLab