[PR #169] [MERGED] refactor: improve code quality and type safety #204

Closed
opened 2026-02-13 17:28:05 -06:00 by mirrors · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/HanaokaYuzu/Gemini-API/pull/169
Author: @faithleysath
Created: 11/21/2025
Status: Merged
Merged: 11/25/2025
Merged by: @HanaokaYuzu

Base: masterHead: refactor/code-quality


📝 Commits (3)

  • 72199e7 refactor: improve code quality and type safety
  • 711a519 Apply suggestions from code review
  • df00136 refactor: revert unnecessary changes

📊 Changes

3 files changed (+36 additions, -18 deletions)

View changed files

📝 src/gemini_webapi/client.py (+5 -5)
📝 src/gemini_webapi/types/image.py (+27 -10)
📝 src/gemini_webapi/utils/decorators.py (+4 -3)

📄 Description

  • Add TYPE_CHECKING imports for better type hinting
  • Refactor GemJar from inheritance to composition pattern
  • Improve exception handling with proper error messages
  • Add assert statements for better runtime validation
  • Optimize regex usage and variable naming
  • Add ImportError handling for optional dependencies
  • Enhance type annotations with Sequence vs List where appropriate

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/HanaokaYuzu/Gemini-API/pull/169 **Author:** [@faithleysath](https://github.com/faithleysath) **Created:** 11/21/2025 **Status:** ✅ Merged **Merged:** 11/25/2025 **Merged by:** [@HanaokaYuzu](https://github.com/HanaokaYuzu) **Base:** `master` ← **Head:** `refactor/code-quality` --- ### 📝 Commits (3) - [`72199e7`](https://github.com/HanaokaYuzu/Gemini-API/commit/72199e77029942f1c777c39edc3b31f22bd68f97) refactor: improve code quality and type safety - [`711a519`](https://github.com/HanaokaYuzu/Gemini-API/commit/711a519550622396dd036b56de485aa42db7eb41) Apply suggestions from code review - [`df00136`](https://github.com/HanaokaYuzu/Gemini-API/commit/df00136a9f51f9aed88e33c9f118888d9a4e03a0) refactor: revert unnecessary changes ### 📊 Changes **3 files changed** (+36 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `src/gemini_webapi/client.py` (+5 -5) 📝 `src/gemini_webapi/types/image.py` (+27 -10) 📝 `src/gemini_webapi/utils/decorators.py` (+4 -3) </details> ### 📄 Description - Add TYPE_CHECKING imports for better type hinting - Refactor GemJar from inheritance to composition pattern - Improve exception handling with proper error messages - Add assert statements for better runtime validation - Optimize regex usage and variable naming - Add ImportError handling for optional dependencies - Enhance type annotations with Sequence vs List where appropriate 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirrors 2026-02-13 17:28:05 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mirrors/Gemini-API#204
No description provided.