Fixed ruff lint issues for src/contextual_retrieval#370
Open
nuwangeek wants to merge 48 commits intobuerokratt:wipfrom
Open
Fixed ruff lint issues for src/contextual_retrieval#370nuwangeek wants to merge 48 commits intobuerokratt:wipfrom
nuwangeek wants to merge 48 commits intobuerokratt:wipfrom
Conversation
Get update from wip into llm-316
Get update from llm-316
Intent enrichment pipeline (buerokratt#319)
get update from wip into llm-304
Service layer validation in tool classifier (buerokratt#321)
Get update from wip
Pulling changes from BYK wip to LLM-Module WIP
Get update from wip into optimization/data-enrichment
…mance improvement
Get update from optimization/data-enrichment into optimization/vector-indexer
Optimize intent data enrichment and service classification (buerokratt#325)
Optimize first user query response generation time (buerokratt#326)
Get update from llm-309 before getting context generation workflow changes
Get update from llm-310 into llm/service-integration
Get update from llm-310
Context based response generation workflow (buerokratt#327)
Sync wip branches 3/18/2026
fixed the test production UI issue (buerokratt#366)
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.
This pull request introduces several improvements focused on type hinting, resource management, and code clarity across the contextual retrieval modules. The main themes are stricter type annotations, improved resource cleanup, and enhanced code maintainability.
Type hinting and interface clarity:
-> None,-> "HTTPClientManager", etc.) to constructors and key methods in classes such asSmartBM25Search,DynamicProviderDetection,QdrantContextualSearch,DynamicRankFusion, andContextualRetrieverfor improved code clarity and static analysis. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]TYPE_CHECKINGimports and forward references forHTTPClientManagerin relevant files to avoid circular dependencies and clarify interface boundaries. [1] [2] [3] [4] [5] [6]Resource management and cleanup:
closemethods in multiple classes to use explicit return types (-> None) and ensure proper cleanup of HTTP client resources. [1] [2] [3] [4]Code clarity and robustness:
get_clientby chaining exceptions withfrom efor better error traceability.ContextualRetrieverto usezip(..., strict=True)for stricter input validation and safer parallel processing.Configuration and linting:
pyproject.tomlfor Ruff linter to accommodate legitimate special cases (e.g., missing type annotations, camelCase fields for API contracts, print statements in scripts).