From: Luca Vizzarro <Luca.Vizzarro@arm.com>
To: Andrew Bailey <abailey@iol.unh.edu>
Cc: dev@dpdk.org, dmarx@iol.unh.edu, probb@iol.unh.edu
Subject: Re: [PATCH v2] dts: type hints updated for method arguments and return types
Date: Mon, 11 Aug 2025 11:13:06 +0100 [thread overview]
Message-ID: <87039a93-a29f-4692-8e35-f7c2e1509deb@arm.com> (raw)
In-Reply-To: <CABJ3N2XQ+B0hLroTPmj2dW+MQiE7O4SJ_oxUZ4oquFY=2--CcA@mail.gmail.com>
On 08/08/2025 21:49, Andrew Bailey wrote:
> Thank you Luca for the review,
>
> Regarding the changes to the enum in utils.py, adding type hints to the
> extension method revealed an underlying issue with its interaction with
> mypy. Using self.none.value within the return fstring causes an error
> and I will send the details over slack shortly. I had tried to get
> around this by not calling value on none but could not maintain the
> functionality of this method while simultaneously keeping mypy happy.
> Within my patch is the only solution that I had that worked, where
> calling self.tar.value was fine with the linter when using auto().
>
> Regards,
> Andrew
Oh I see,
In cases like these the problem is not changing up the current
definitions :D, but figure out why the problem is happening.
It looks like this is happening because we are trying to access another
enum member from the instance instead of the class. This should solve it:
none = type(self).none
for readability's sake you can also split it across multiple lines
instead of the inline if.
A note for future replies, a mailing list should be treated like an
online forum. If we quote the entire message, and that message also has
more quotes under it, the thread will become quite congested and hard to
read. On forums we quote a part of the post and reply directly beneath
it, as it follows the logical reading order. This is referred to as
bottom posting. There is also the part where a lot of junk will fill up
the mailing list archive and the maintainers won't be happy. There is
this resource which is concise that I highly recommend:
https://useplaintext.email
When you have the time please review the kernel's contribution
guidelines on which the DPDK contribution guidelines expand on:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html
Best regards,
Luca
next prev parent reply other threads:[~2025-08-11 10:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-06 16:29 Andrew Bailey
2025-08-08 18:21 ` Luca Vizzarro
2025-08-08 20:49 ` Andrew Bailey
2025-08-11 10:13 ` Luca Vizzarro [this message]
2025-08-11 10:52 ` Luca Vizzarro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87039a93-a29f-4692-8e35-f7c2e1509deb@arm.com \
--to=luca.vizzarro@arm.com \
--cc=abailey@iol.unh.edu \
--cc=dev@dpdk.org \
--cc=dmarx@iol.unh.edu \
--cc=probb@iol.unh.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).