[
https://issues.apache.org/jira/browse/KAFKA-18349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18112324#comment-18112324
]
HuangLeShu commented on KAFKA-18349:
------------------------------------
Hi TaiJuWu, I looked into this and the gap is still there on trunk: of 150
Python files under {{{}tests/{}}}, only one
({{{}kafkatest/tests/core/quorum_reconfiguration_test.py{}}}) imports
{{{}typing{}}}, none has return annotations, and {{tests/setup.cfg}} only
configures pytest — there is no mypy/flake8 gate.
I'd like to pick this up, but 150 files is too much for one PR, so I'd propose
slicing it by directory. As a first slice I'd take
{{kafkatest/services/trogdor}} (13 files) — I checked all currently open PRs
and none of them touches those files, so it won't conflict.
Three questions before I start:
# Should the first PR also add a mypy configuration and a CI check, or keep it
annotation-only and add tooling later?
# For style, should I follow the existing precedent ({{{}from typing import
List{}}}) or use PEP 585 builtins ({{{}list[int]{}}})? CI pins Python 3.10, so
both work.
# Are you still planning to work on this yourself? If so I'm happy to leave it.
> Consider add typing hint for system test
> ----------------------------------------
>
> Key: KAFKA-18349
> URL: https://issues.apache.org/jira/browse/KAFKA-18349
> Project: Kafka
> Issue Type: Test
> Reporter: TaiJuWu
> Priority: Major
>
> Our system test is written by Python but it is not included typing hint right
> now.
> There is some pain for readability since we don't know the type when
> developing.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)