fix: update type ignore comments for improved type checking and clarity #113
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.
closes #110
This pull request primarily improves type annotation clarity and code maintainability by updating or refining type ignore comments throughout the codebase. It also expands the
AgentPerformanceMetricsmodel with additional attributes and clarifies fallback patterns for optional dependencies. The changes help future maintainers understand the reasons behind type ignores and improve the robustness of model definitions.Type annotation and ignore comment improvements:
type: ignorecomments across many files to specify the reason (e.g., missing/incomplete type stubs for libraries likefitz,dulwich,slack_sdk,tweepy, or dynamic model creation in Pydantic), making the codebase easier to maintain and debug. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Model and data structure enhancements:
AgentPerformanceMetricsmodel to include new fields such asaccuracy_history,confidence_calibration,specialization_score,collaboration_rating,bias_indicators, anddomain_expertise, providing a more comprehensive view of agent performance.Bug fixes and code simplification:
Other improvements:
List of Remaining Suppressions with Reasons
All 31 type suppressions are now properly categorized and justified:
Missing Type Stubs (External Libraries)
7 suppressions for fitz (PyMuPDF) - [reportMissingTypeStubs] and [attr-defined]
3 suppressions for tweepy - [reportMissingTypeStubs], [arg-type], [attr-defined]
2 suppressions for slack_sdk - [attr-defined]
1 suppression for dulwich - [attr-defined]
1 suppression for pytesseract - [reportMissingTypeStubs]
1 suppression for google-genai client - [arg-type]
Optional Dependencies
2 suppressions for pydantic_ai - [import-untyped] (optional AI framework)
Framework Patterns
8 suppressions for BaseModel fallback patterns - [misc] (pydantic optional dependency pattern)
1 suppression for Pydantic dynamic model creation - [call-arg]
1 suppression for ADK decorator unwrapping - [attr-defined]