From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B109944101; Wed, 29 May 2024 13:23:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 851E3402CD; Wed, 29 May 2024 13:23:12 +0200 (CEST) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by mails.dpdk.org (Postfix) with ESMTP id EABCB402B9 for ; Wed, 29 May 2024 13:23:10 +0200 (CEST) Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a653972487fso40505066b.1 for ; Wed, 29 May 2024 04:23:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1716981790; x=1717586590; 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=pQUrABUHdNReoIEEXYQK04qc035p2TW180Gap6NloXQ=; b=ijBJ5nY+g3iM9Ae5TwhfNmPoy0Ukpk1Uv3cX8KQTjpuli6SopfctDTZA4PUFfFiWLZ EyB0l7KI1n5pabDMGnQ/3P4O3UCaOF959F+1TCHmcmG9te09jiy1nnjMxdeq6DbBx8R3 FoCmcfAQJ0vO8eilUne9/GpiQhMc8FwcC7ntVL+eSGZUKgfiAXbddJfnjBcwK7g5ImUe o98RNE7n5hBHkMMnT1J8WYD93JO9pE9woUQHTWK3dgzmSDCMxAdPBPGIknXk326UzwVc 2arVBfWszMB5awWVgbWcgOERcmhveMhjWpJkTulFgbbxjC3hB7HUgqVprMHguODrBnav n62Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716981790; x=1717586590; 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=pQUrABUHdNReoIEEXYQK04qc035p2TW180Gap6NloXQ=; b=SIG5uEv0NwBPIZsVAj4cJeQs8ZZL8He3Wh/bbKFgfCTSzkyOi5qcAxO3XDpjG83dUg 4RUIwk5kaHSWEpoUQLgeB4YWTh2Gipc8S0c4cw+k0hY3FWB7NtzYa9aE2GlZdKlQnk51 hMhppaezE3aLgLOYWO1dn+sNkh6PfPMWi78GGvS6JIVowNNAG4bqtOh+Fo9DADxVpwHn cuoBechV5T4l8Y03bCvF2MnOoAkasBgslGFMht2A420Sm8B1M9o/un0iwBj/slnLW2s0 kVkM9enxe8GE4Q+bLXfk2DnybAY/+XL3lPn4cSxyz46azdw7mcSd3y1s7CGYYU8Psosx V+sg== X-Gm-Message-State: AOJu0Yw5J7CW39W3Hu+1RW3sklD0lUaMEuIbD2m85A4H4nkf2X6DFAwS QQH9mS6f8TQorMln6dhSNH1Se1gvZzzUGVPu8CTXTFpzTCOu+Wsyuu/5kqUqnjM7Yfk2CKU5LGn 54jitSOm159K3NjZeW8A9hsUaNKENbVxGtLw+oA== X-Google-Smtp-Source: AGHT+IFciY+biY6nwWUTwR1uFjnNu1wB1iyIYgj4ECMeyabQy5MR8gLDtJj88sXNTmoqKgTGohPmDJ02NPjqo2uZgQI= X-Received: by 2002:a17:907:94cb:b0:a62:ee4d:5401 with SMTP id a640c23a62f3a-a62ee4d5598mr640515866b.65.1716981789698; Wed, 29 May 2024 04:23:09 -0700 (PDT) MIME-Version: 1.0 References: <20240509105704.1162449-1-luca.vizzarro@arm.com> <20240509105704.1162449-2-luca.vizzarro@arm.com> <455e78ea-ad27-467e-ab3b-cfacb9de970e@arm.com> In-Reply-To: <455e78ea-ad27-467e-ab3b-cfacb9de970e@arm.com> From: =?UTF-8?Q?Juraj_Linke=C5=A1?= Date: Wed, 29 May 2024 13:22:58 +0200 Message-ID: Subject: Re: [PATCH 1/2] dts: update mypy static checker To: Luca Vizzarro Cc: dev@dpdk.org, Jeremy Spewock , Paul Szczepanek 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, May 14, 2024 at 1:30=E2=80=AFPM Luca Vizzarro wrote: > > On 13/05/2024 17:02, Juraj Linke=C5=A1 wrote: > >> def _filter_test_cases( > >> self, test_suite_class: type[TestSuite], test_cases_to_run: = Sequence[str] > >> - ) -> tuple[list[MethodType], list[MethodType]]: > >> + ) -> tuple[list[FunctionType], list[FunctionType]]: > > > > Does changing inspect.getmembers(test_suite_class, inspect.isfunction) > > to use inspect.ismethod not work? > > Nope, for some reason when running inspect.ismethod on the TestSuite > class methods it returns False... I didn't investigate further, as just > isfunction works and it's not a deal breaker. I looked a bit into this and ismethod() returns True for instance methods (the function knows the instance it's bound to) and we're working with class members (in this case, there's no instance associated with the function, so it actually can't be a method), so we have to use isfunction() and as such the change to FunctionType is the proper one.