Skip to content

LCORE-1531: Removed type ignore#1372

Merged
tisnik merged 1 commit intolightspeed-core:mainfrom
tisnik:lcore-1531-removed-type-ignore
Mar 23, 2026
Merged

LCORE-1531: Removed type ignore#1372
tisnik merged 1 commit intolightspeed-core:mainfrom
tisnik:lcore-1531-removed-type-ignore

Conversation

@tisnik
Copy link
Copy Markdown
Contributor

@tisnik tisnik commented Mar 23, 2026

Description

LCORE-1531: removed type ignore

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-1531

Summary by CodeRabbit

  • Chores
    • Internal type and annotation cleanup to improve code maintainability and developer tooling.
    • Minor import-line cleanup and signature typing improvements.
    • No user-facing changes or behavior differences.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 23, 2026

Walkthrough

Two files updated to improve typing: src/client.py had an inline # type: ignore removed from an import, and src/utils/types.py added a SingletonInstances type alias and annotated the Singleton metaclass _instances and __call__ signature; runtime logic unchanged.

Changes

Cohort / File(s) Summary
Client import cleanup
src/client.py
Removed an inline # type: ignore from the from llama_stack_client import APIConnectionError, AsyncLlamaStackClient import; no functional change.
Singleton typing improvements
src/utils/types.py
Added type SingletonInstances = dict[type, Any]; annotated _instances: SingletonInstances = {} and def __call__(cls, *args: Any, **kwargs: Any) -> Any; logic unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 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.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Title check ✅ Passed The title accurately reflects the main change: removing type ignore comments from the codebase and replacing them with proper type annotations.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/utils/types.py`:
- Around line 54-56: Define a module-level type alias (e.g., InstanceCache =
Dict[Type[Any], Any]) and replace the bare _instances: dict = {} with a
fully-typed declaration using that alias (e.g., _instances: InstanceCache = {}),
and ensure any necessary typing imports (Type, Dict, Any) are added; update the
SingletonMeta or the __call__ implementation references to use this alias to
make the singleton cache type explicit and satisfy the "complete type
annotations" guideline.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3c328574-9cc3-4a8e-a029-98e0d81077bd

📥 Commits

Reviewing files that changed from the base of the PR and between 3049234 and dec4147.

📒 Files selected for processing (2)
  • src/client.py
  • src/utils/types.py

@tisnik tisnik force-pushed the lcore-1531-removed-type-ignore branch from dec4147 to 0b231e3 Compare March 23, 2026 07:58
@tisnik tisnik changed the title LCORE-1531: removed type ignore LCORE-1531: Removed type ignore Mar 23, 2026
@tisnik tisnik merged commit c096d97 into lightspeed-core:main Mar 23, 2026
24 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