Skip to content

Enable PT007 rule to apache.kafka Provider test#66147

Merged
jason810496 merged 1 commit intoapache:mainfrom
ColtenOuO:enable-pt007-apache-kafka
May 2, 2026
Merged

Enable PT007 rule to apache.kafka Provider test#66147
jason810496 merged 1 commit intoapache:mainfrom
ColtenOuO:enable-pt007-apache-kafka

Conversation

@ColtenOuO
Copy link
Copy Markdown
Contributor

Summary

Fix 3 PT007 violations in providers/apache/kafka/tests/unit/apache/kafka/operators/test_consume.py by converting pytest.mark.parametrize value rows from list to tuple, following ruff's default parametrize-values-row-type = "tuple".

This is one step in the gradual cleanup toward removing PT007 from the ignore list in pyproject.toml, mirroring the same approach used for the recently completed PT006 series.

Why this change

PT007 flags cases where parameter rows in @pytest.mark.parametrize(...) use list instead of tuple. The rule treats this as a readability / consistency issue rather than a correctness one — pytest accepts both — so the change is purely stylistic but enforces a consistent convention across the codebase.

Reference: ruff PT007 — pytest-parametrize-values-wrong-type (derived from flake8-pytest-style).

@jason810496 jason810496 force-pushed the enable-pt007-apache-kafka branch from 5ce5313 to 23b6a51 Compare April 30, 2026 14:21
@jason810496 jason810496 merged commit 1738252 into apache:main May 2, 2026
89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants