From: Leo Yan <leo.yan@arm.com>
To: James Clark <james.clark@linaro.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf python: Fix arm-cs-trace-disasm type error
Date: Mon, 28 Sep 2026 14:46:42 +0100 [thread overview]
Message-ID: <20260928134642.GE14479@e132581.arm.com> (raw)
In-Reply-To: <20260928-james-perf-mypy-cs-disasm-v1-1-1bda909475ce@linaro.org>
On Mon, Sep 28, 2026 at 01:58:09PM +0100, James Clark wrote:
> The perf sample dso_bid getter returns a string or None, matching its
> Optional[str] annotation. Attempting to decode it as bytes causes mypy
> to report union-attr errors, even though this was behind a conditional
> that checked for bytes type.
>
> Use the string directly, retaining the fallback for an unknown build ID.
>
> This fixes the following build error:
>
> python/arm-cs-trace-disasm.py:266: error: Item "None" of "str | None" has no attribute "decode" [union-attr]
>
> Fixes: 279b402e5143 ("perf python: Port arm-cs-trace-disasm to perf module")
> Assisted-by: Codex:GPT-6-Astra
> Signed-off-by: James Clark <james.clark@linaro.org>
Thanks for the fix:
Reviewed-by: Leo Yan <leo.yan@arm.com>
Just curious, have you run this script and compare the result with old
one? Seems to me, the build pass is insufficient, we should run a small
test to ensure the result to keep same.
Thanks,
Leo
next prev parent reply other threads:[~2026-09-28 13:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 12:58 [PATCH] perf python: Fix arm-cs-trace-disasm type error James Clark
2026-09-28 13:01 ` sashiko-bot
2026-09-28 13:46 ` Leo Yan [this message]
2026-09-28 13:52 ` James Clark
2026-09-28 15:11 ` Ian Rogers
2026-09-28 16:29 ` Arnaldo Carvalho de Melo
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=20260928134642.GE14479@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=acme@kernel.org \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.