From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id E374B440B6;
	Fri, 24 May 2024 16:51:51 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id CE824402F0;
	Fri, 24 May 2024 16:51:51 +0200 (CEST)
Received: from mail-oa1-f53.google.com (mail-oa1-f53.google.com
 [209.85.160.53]) by mails.dpdk.org (Postfix) with ESMTP id 5FAED40271
 for <dev@dpdk.org>; Fri, 24 May 2024 16:51:50 +0200 (CEST)
Received: by mail-oa1-f53.google.com with SMTP id
 586e51a60fabf-24d8b372911so118463fac.1
 for <dev@dpdk.org>; Fri, 24 May 2024 07:51:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=iol.unh.edu; s=unh-iol; t=1716562309; x=1717167109; darn=dpdk.org;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=EazzIXDyRFQr3iiJ5W5sTDTB1O9S11dd7Dd8bdgIm3A=;
 b=CgypgU/oCxerTLVg8qB18/BBWV75F2ifOk/riZp+SUtXG22Lum+au45GhiQyAWJ2SX
 MSAx5sqcEYGqWO0UR/sJlJ2kgn0D6NKV2oQfHFAThSPkAlrbnXBgByj4tMAZw5DQ6maI
 gwb6AlCXbGwNp7kE8QC1yj5GmxwtAZ+AkP1w8=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1716562309; x=1717167109;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=EazzIXDyRFQr3iiJ5W5sTDTB1O9S11dd7Dd8bdgIm3A=;
 b=e/VfaJ2I0/RcKMR+8i21sW57NuXIFwwUOLkxsNM6WkwrcsOrlr92Xir/9rvgm3d8qN
 pNQ1WC1rJ+v0yppFzZHVQQ8u0dy5DiTOiiBZ57mX9a9uyQnyjov3dKAjKrpg31b7IC4t
 MjROxbhC6ITpUsYryA289wvjMHqlt/LTHVX/ASuRnEvSLZNjkBk4lPccuPGMuF/yWUoQ
 TeDsqDkGvG5RtWAHppJ4uKMrPehLdVmvnsSVsq6AJBOosn49lyvSGArT1bNdFP/yPWBM
 +FlSNA3xJOqKpAT7Q60dVG0UwaeatOSJqyuYCapDnDUR1+d0zoMM9l2Cqjx13N7LZb+l
 Ab6w==
X-Gm-Message-State: AOJu0Ywu/I5cIW/jVneIw9d70vR/cBtyrIwRvWDFgakU2/9Q3xuO0gwX
 uPl7e1i2tOxzxKhSm6lTH80sqh/JT/qksn6nYeczgLlHaX/G3wO5j0riWTSIxK0DwQM57hzMhKN
 7ZQFUYQijJC6o17UfcCuSAR/Iwn+3e5NHmcbCbg==
X-Google-Smtp-Source: AGHT+IHNygmiIlWGPt/WeEFwPxbM1/8NirpIw0YNq6u5ra2Ktch/4twChp4KvYG1isYiENJJoYye25jNYc7qYmsojss=
X-Received: by 2002:a05:6870:ac2c:b0:24c:824e:7ace with SMTP id
 586e51a60fabf-24ca10d9761mr2675623fac.3.1716562309499; Fri, 24 May 2024
 07:51:49 -0700 (PDT)
MIME-Version: 1.0
References: <20240509105704.1162449-1-luca.vizzarro@arm.com>
 <20240514113446.1948050-1-luca.vizzarro@arm.com>
 <20240514113446.1948050-2-luca.vizzarro@arm.com>
In-Reply-To: <20240514113446.1948050-2-luca.vizzarro@arm.com>
From: Patrick Robb <probb@iol.unh.edu>
Date: Fri, 24 May 2024 10:51:38 -0400
Message-ID: <CAJvnSUAToxGse3Ak-hDoj9=hMv=XBFCAYZ0xAe7PtzUEy=QF=g@mail.gmail.com>
Subject: Re: [PATCH v2 1/2] dts: update mypy static checker
To: Luca Vizzarro <luca.vizzarro@arm.com>
Cc: dev@dpdk.org, =?UTF-8?Q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>, 
 Jeremy Spewock <jspewock@iol.unh.edu>,
 Paul Szczepanek <paul.szczepanek@arm.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Tue, May 14, 2024 at 7:34=E2=80=AFAM Luca Vizzarro <luca.vizzarro@arm.co=
m> wrote:
> diff --git a/dts/framework/runner.py b/dts/framework/runner.py
> index db8e3ba96b..d74f1871db 100644
> --- a/dts/framework/runner.py
> +++ b/dts/framework/runner.py
> @@ -23,7 +23,7 @@
>  import re
>  import sys
>  from pathlib import Path
> -from types import MethodType
> +from types import FunctionType
>  from typing import Iterable, Sequence
>
>  from .config import (
> @@ -132,8 +132,8 @@ def run(self):
>          the :option:`--test-suite` command line argument or
>          the :envvar:`DTS_TESTCASES` environment variable.
>          """
> -        sut_nodes: dict[str, SutNode] =3D {}
> -        tg_nodes: dict[str, TGNode] =3D {}
> +        sut_nodes =3D {}
> +        tg_nodes =3D {}

I think this is fine. Another option would be to move sut_nodes and
tg_nodes up as DTSRunner attributes. I like preserving the type hint,
but it also might just be cluttering the code to do this... up to you.

But overall I think it is good and I ran the mypy type check from this patc=
h.

Reviewed-by: Patrick Robb <probb@iol.unh.edu>
Tested-by: Patrick Robb <probb@iol.unh.edu>