-
Notifications
You must be signed in to change notification settings - Fork 6
215 poprawa typów dla myp i uzupełnienie tłumaczeń EN #136
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
Conversation
Summary of ChangesHello @mpieniak01, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on improving code quality and enhancing the user experience. It addresses type annotation issues to ensure better code maintainability and adds missing English translations to improve the accessibility of the application for English-speaking users. Additionally, it includes updates to the Makefile and documentation to provide better guidance and context for developers and users. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Pull request overview
This pull request implements comprehensive type safety improvements for mypy and completes English translations across all web UI screens. The changes span ~50 files with two primary objectives:
Changes:
- Type annotations added to core modules (MCP tools, queue, providers, adapters) to achieve clean
make typecheckexecution - Complete English translations for all
/web/*.htmlscreens viai18n.jsdictionary expansion - New validation script
check_i18n.mjsto enforce translation completeness
Reviewed changes
Copilot reviewed 65 out of 66 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| mypy.ini | New mypy configuration targeting Python 3.11 with strict optional checks |
| pc_client/utils/async_helpers.py | New helper module providing thread-safe fallback for asyncio.to_thread |
| pc_client/mcp/tools/*.py | Added TypedDict definitions for all MCP tool return types |
| pc_client/queue/redis_queue.py | Added type hints with TYPE_CHECKING guards for Redis client |
| pc_client/services/google_assistant.py | Fixed tomllib/tomli imports and added GoogleCredentials typing |
| pc_client/providers/*.py | Updated constructors to accept Optional[Dict] configs |
| pc_client/adapters/*.py | Added return type normalization for subprocess return codes |
| web/assets/i18n.js | Expanded with 300+ English translation keys across all UI sections |
| web/*.html | Added data-i18n attributes and replaced hardcoded Polish strings |
| scripts/check_i18n.mjs | New validation script ensuring all i18n keys have English translations |
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.
Code Review
To jest bardzo obszerne i wartościowe pull request, który wprowadza statyczną analizę typów za pomocą mypy oraz uzupełnia tłumaczenia na język angielski w całym interfejsie użytkownika. Zmiany znacząco poprawiają jakość i utrzymywalność kodu. Wprowadzenie TypedDict w modułach mcp/tools oraz poprawki typowania w adapterach i serwisach są doskonałym krokiem w kierunku większej niezawodności. Dodałem kilka sugestii, w tym jedną krytyczną poprawkę błędu, który mógłby prowadzić do UnboundLocalError, oraz propozycję refaktoryzacji w celu zmniejszenia duplikacji kodu w plikach HTML. Świetna robota!
|
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.
Pull request overview
Copilot reviewed 68 out of 69 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (1)
pc_client/utils/system_info.py:25
- The _safe_call function signature changed to require a default value of the same type T as the return type. However, this forces callers to provide typed defaults even when they want None. Consider using Optional[T] as the return type and allowing default to be None, which would be more flexible:
def _safe_call(fn: Callable[[], T], default: Optional[T] = None) -> Optional[T]:
Zakres:
w ramach wydania zbiorczego #214/#215.
Status: make typecheck przechodzi; testy z listy regresyjnej (m.in. test_assistant_router, test_mcp_tools, test_project_issues) zakończone wynikiem 132 passed / 27 skipped.
Szczegóły i kontekst: docs_pl/_to_do/215_plan-naprawy-mypy.md
i docs_pl/_to_do/214_tlumaczenia-en.md