-
Notifications
You must be signed in to change notification settings - Fork 0
chore: integrate @tanstack/eslint-plugin-query and fix service layer lint errors #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: greptile_combined-20260114-qodo-grep-copilot_base_chore_integrate_tanstack_eslint-plugin-query_and_fix_service_layer_lint_errors_pr263
Are you sure you want to change the base?
chore: integrate @tanstack/eslint-plugin-query and fix service layer lint errors #75
Conversation
Greptile SummaryThis PR integrates Key Changes:
Issues Found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant ESLint as ESLint Config
participant TQ as @tanstack/eslint-plugin-query
participant Services as Service Layer Files
participant Queries as React Query Hooks
Dev->>ESLint: Add @tanstack/eslint-plugin-query
ESLint->>TQ: Load flat/recommended config
TQ->>Services: Scan for query hook violations
Services->>TQ: Check queryKey dependencies
TQ-->>Services: Report missing dependencies in queryKeys
Dev->>Services: Fix queryKey to include all dependencies
Note over Services: access-control.ts, use-models.ts,<br/>use-document.ts, use-segment.ts,<br/>use-pipeline.ts, use-plugins.ts,<br/>goto-anything/index.tsx
Services->>Queries: Updated queryKeys with proper deps
Note over Queries: Ensures cache invalidation<br/>works correctly when deps change
Dev->>Services: Refactor useModelInList
Note over Services: Extract primitive provider<br/>value for stable queryKey
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10 files reviewed, 1 comment
| self, tenant_id: str, provider: str, model_type: str, model, credential_id: str | None | ||
| ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Type annotations removed violate the Python style guide in AGENTS.md which states "Keep type hints on functions and attributes". The model parameter should be typed as str and the return type should be -> dict | None
| self, tenant_id: str, provider: str, model_type: str, model, credential_id: str | None | |
| ): | |
| def get_model_credential( | |
| self, tenant_id: str, provider: str, model_type: str, model: str, credential_id: str | None | |
| ) -> dict | None: |
Context Used: Context from dashboard - CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: api/services/model_provider_service.py
Line: 234:235
Comment:
**style:** Type annotations removed violate the Python style guide in AGENTS.md which states "Keep type hints on functions and attributes". The `model` parameter should be typed as `str` and the return type should be `-> dict | None`
```suggestion
def get_model_credential(
self, tenant_id: str, provider: str, model_type: str, model: str, credential_id: str | None
) -> dict | None:
```
**Context Used:** Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=a5f96311-5bd1-49f2-9828-2ee0c089c012))
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.
Benchmark PR from qodo-benchmark#263