Skip to content

LCORE-974: fixed issues found by Pyright#108

Merged
tisnik merged 1 commit intolightspeed-core:mainfrom
tisnik:lcore-974-fixed-issues-found-by-pyright
Nov 24, 2025
Merged

LCORE-974: fixed issues found by Pyright#108
tisnik merged 1 commit intolightspeed-core:mainfrom
tisnik:lcore-974-fixed-issues-found-by-pyright

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Nov 24, 2025

Description

LCORE-974: fixed issues found by Pyright

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
  • Unit tests improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

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

Related Tickets & Documents

  • Related Issue #LCORE-974

Summary by CodeRabbit

  • Tests
    • Enhanced test validation for TurnData initialization by adding a non-null assertion for the contexts property.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 24, 2025

Walkthrough

A test file is updated to add an assertion validating that the contexts field is not None in the test_valid_turn_data_creation test method for TurnData object creation.

Changes

Cohort / File(s) Summary
Test assertion addition
tests/unit/core/config/test_models.py
Adds assertion verifying contexts is not None in test_valid_turn_data_creation, enforcing non-null validation for TurnData contexts field

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

✅ 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 references fixing Pyright issues (LCORE-974), which aligns with the PR objective of addressing type-checking issues, though the summary shows only a minor test assertion addition.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 883ebfa and 685d63a.

📒 Files selected for processing (1)
  • tests/unit/core/config/test_models.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
tests/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

tests/**/*.py: Use pytest with pytest-mock (mocker fixture), not unittest.mock, for all mocking
Test files should use naming convention test_*.py for files, test_* for functions, and Test* for classes

Files:

  • tests/unit/core/config/test_models.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: tests (3.12)
  • GitHub Check: tests (3.13)
  • GitHub Check: mypy
  • GitHub Check: Pyright
🔇 Additional comments (1)
tests/unit/core/config/test_models.py (1)

32-32: LGTM! Valid type narrowing for Pyright.

The assertion correctly addresses the Pyright issue by narrowing the type of contexts before it's accessed on lines 33-34. This is a standard pattern for satisfying static type checkers when dealing with Optional types, even though the test explicitly provides a non-None value.


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 5c96d6c into lightspeed-core:main Nov 24, 2025
15 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