Skip to content

LCORE-1430: fixed new linter errors#1286

Merged
tisnik merged 2 commits intolightspeed-core:mainfrom
tisnik:lcore-1430-fixed-new-linter-errors
Mar 8, 2026
Merged

LCORE-1430: fixed new linter errors#1286
tisnik merged 2 commits intolightspeed-core:mainfrom
tisnik:lcore-1430-fixed-new-linter-errors

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Mar 8, 2026

Description

LCORE1430: fixed new linter errors

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • 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-1430

Summary by CodeRabbit

  • Chores
    • Updated codebase to use modern Python type annotation standards.
    • Enhanced code quality checks through improved linting configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ba9970bc-f6fa-4b4f-a94e-2d635223e0b1

📥 Commits

Reviewing files that changed from the base of the PR and between 9bb4017 and f8c83fb.

📒 Files selected for processing (3)
  • pyproject.toml
  • src/models/responses.py
  • src/utils/conversations.py

Walkthrough

The codebase is updated to use PEP 604 union syntax (|) instead of typing.Union for type annotations. Additionally, the ruff linter configuration is extended to enforce this modern syntax style via the "UP007" rule.

Changes

Cohort / File(s) Summary
Ruff Lint Configuration
pyproject.toml
Added "UP007" to tool.ruff.lint.extend-select to enforce PEP 604 union syntax in type annotations.
Type Annotation Modernization
src/models/responses.py, src/utils/conversations.py
Updated type annotations from Union[...] to | syntax in ProviderResponse class and _extract_text_from_content function. Removed Union from typing imports.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: enabling a new linter rule (UP007) and updating type annotations to comply with it across multiple files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@tisnik tisnik merged commit 31cb292 into lightspeed-core:main Mar 8, 2026
22 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