Skip to content

LCORE-3431: Enable Ruff rule UP040 - #2417

Merged
tisnik merged 1 commit into
lightspeed-core:mainfrom
tisnik:lcore-3431-enable-ruff-rule-up040
Aug 12, 2026
Merged

LCORE-3431: Enable Ruff rule UP040#2417
tisnik merged 1 commit into
lightspeed-core:mainfrom
tisnik:lcore-3431-enable-ruff-rule-up040

Conversation

@tisnik

@tisnik tisnik commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

LCORE-3431: Enable Ruff rule UP040

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library [pyproject.toml + uv.lock]
  • Bump-up dependent library [requirements.*.txt for Konflux]
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

  • Assisted-by: N/A
  • Generated by: N/A

Related Tickets & Documents

  • Related Issue #LCORE-3431

Summary by CodeRabbit

  • Chores
    • Updated linting rules to improve detection of outdated type-alias syntax.
    • No user-facing functionality changes.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d332f2a2-5dad-4ef4-8437-84282249a4d8

📥 Commits

Reviewing files that changed from the base of the PR and between 16fef74 and 7219b94.

📒 Files selected for processing (1)
  • pyproject.toml
📜 Recent review details
⏰ Context from checks skipped due to timeout. (16)
  • GitHub Check: bandit
  • GitHub Check: pydocstyle
  • GitHub Check: build-pr
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: spectral
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-8-on-pull-request
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 1
🧰 Additional context used
📓 Path-based instructions (2)
**/*

📄 CodeRabbit inference engine (Custom checks)

**/*: Flag meaningful O(n^2)+ algorithms on non-trivial inputs, including handlers and Kubernetes list operations.
Flag N+1 patterns that list items and then query once per item, including Kubernetes API and database access.
Flag expensive work inside loops, including API calls, JSON parsing, and regex compilation.
Flag unbounded growth in caches, watchers, or buffers when eviction or limits are missing.
Flag missing pagination or limits on list operations and API endpoints.
Flag secrets or tokens logged in plaintext or hardcoded in source.
Flag API endpoints missing authentication or authorization.
Flag injection vulnerabilities, including SQL injection, command injection, and path traversal.
Flag sensitive data leaked in API responses, WebSocket messages, or logs.
Flag Kubernetes Secrets and Red Hat secrets missing OwnerReferences.

Files:

  • pyproject.toml
pyproject.toml

📄 CodeRabbit inference engine (AGENTS.md)

Check pyproject.toml for supported Python versions, existing dependencies, and current library versions before adding dependencies or assuming versions.

Files:

  • pyproject.toml
🔇 Additional comments (1)
pyproject.toml (1)

250-251: LGTM!


Walkthrough

Ruff now enables UP040 and no longer ignores it in pyproject.toml.

Changes

Ruff configuration

Layer / File(s) Summary
Enable UP040 lint rule
pyproject.toml
Ruff selects UP040 and removes it from the ignored rules.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: jrobertboos, asimurka, anik120

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely states that Ruff rule UP040 is being enabled, which matches the primary change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Performance And Algorithmic Complexity ✅ Passed The PR changes only Ruff configuration in pyproject.toml. It adds UP040 to lint selection and removes it from ignore; it introduces no runtime algorithms, loops, API calls, or data structures.
Security And Secret Handling ✅ Passed PASS: The diff changes only Ruff configuration in pyproject.toml. It adds UP040 to lint selection and removes it from ignore; no security-sensitive code or data handling changed.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tisnik
tisnik merged commit 8eea389 into lightspeed-core:main Aug 12, 2026
51 of 62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant