Re: [PATCH v1 3/6] perf build: Add mypy build tests
From: Ian Rogers
Date: Fri Jan 24 2025 - 21:10:31 EST
On Fri, Jan 24, 2025 at 3:51 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
>
> On Fri, Oct 25, 2024 at 10:23:00AM -0700, Ian Rogers wrote:
> > If MYPY=1 is passed to the build then run mypy over python code in
> > perf. Unlike shellcheck this isn't default on as there are currently
> > too many errors.
>
> Can you please add an example output in the commit log? Also you need
> to add a comment to describe the build option.
It feels more of a developer option, so I'm not sure we should
advertise it. Ideally we'd just default it like the shellcheck case.
I'm not sure of the benefit of snapshotting mypy errors, a quick
internet search will show what mypy does and I'd prefer the patch set
focus on the build infrastructure changes.
> Is it ok to pass the option on a system that doesn't have mypy?
I'd expect the shell/which assignment to MYPY would leave it
undefined, in which case the behavior would match not building with
MYPY=1. It's basically the same logic as with shellchecks. I didn't
test/optimize for people requesting a build option with dependencies
missing.
Thanks,
Ian