Re: [PATCH v4 05/11] scripts: generate_rust_analyzer.py: add type hints

From: Daniel Almeida
Date: Tue Mar 25 2025 - 09:50:24 EST


Ah, by the way:


> On 25 Mar 2025, at 10:37, Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx> wrote:
>
> Hi Tamir,
>
>> On 22 Mar 2025, at 10:23, Tamir Duberstein <tamird@xxxxxxxxx> wrote:
>>
>> Python type hints allow static analysis tools like mypy to detect type
>> errors during development, improving the developer experience.
>>
>> Python type hints have been present in the kernel since 2019 at the
>> latest; see commit 6ebf5866f2e8 ("kunit: tool: add Python wrappers for
>> running KUnit tests").
>>
>> Run `mypy --strict scripts/generate_rust_analyzer.py --python-version
>> 3.8` to verify. Note that `mypy` no longer supports python < 3.8.

$ mypy --strict scripts/generate_rust_analyzer.py --python-version 3.8
Success: no issues found in 1 source file

— Daniel