chore: update Ruff & BasedPyright - #656
Open
disrupted wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Updates Python developer tooling (Ruff + BasedPyright) and applies small code/test refactors to satisfy new lint/type-check expectations while keeping runtime behavior consistent with the project’s Python 3.11+ baseline.
Changes:
- Bump dev tool versions:
basedpyrightto>=1.39.9andruffto>=0.16.0(plus lockfile refresh). - Refactor enums to use
enum.StrEnumand apply minor code cleanups prompted by updated linting/type checking. - Adjust tests and Ruff config to align with updated lint rules (e.g., regex match strings, implicit string concatenation, lazy-import rule ignore in tests).
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Updates locked versions/artifacts for BasedPyright and Ruff. |
| pyproject.toml | Bumps dev dependencies; adds Ruff per-file ignore for PLC0415 in tests. |
| kpops/utils/cli_commands.py | Minor refactor in recursive field extraction (uses loop value directly). |
| kpops/manifests/argo.py | Switches enum to enum.StrEnum. |
| kpops/core/operation.py | Switches enum to enum.StrEnum. |
| kpops/core/registry.py | Adds targeted Ruff suppression for lazy import in module discovery. |
| kpops/components/streams_bootstrap/base.py | Marks unused regex groups with underscore-prefixed names. |
| kpops/components/common/kubernetes_model.py | Switches multiple enums to enum.StrEnum. |
| kpops/component_handlers/kafka_connect/model.py | Tweaks validator return type annotation ordering. |
| tests/conftest.py | Makes cache clearing conditional on cache presence. |
| tests/utils/test_doc_gen.py | Fixes string building/implicit concatenation in expected markdown output. |
| tests/test_kpops_config.py | Uses raw regex string for pytest.raises(match=...). |
| tests/pipeline/test_generate.py | Uses raw regex strings for pytest.raises(match=...). |
| tests/manifests/strimzi/test_kafka_topic.py | Uses raw regex string for pytest.raises(match=...). |
| tests/component_handlers/topic/test_topic_handler.py | Uses raw regex strings for pytest.raises(match=...). |
| tests/component_handlers/helm_wrapper/test_helm_wrapper.py | Removes pyright ignore; uses raw regex strings; minor formatting. |
| tests/component_handlers/helm_wrapper/test_helm_diff.py | Groups implicit string concatenation for log assertion. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.