Skip to content

Conversation

@gruebel
Copy link
Member

@gruebel gruebel commented Dec 19, 2025

This PR

  • there is no official pre-commit hook yet, so I defined a local one for now

Signed-off-by: gruebel <anton.gruebel@gmail.com>
@gruebel gruebel requested review from a team as code owners December 19, 2025 22:34
@gemini-code-assist
Copy link

Summary of Changes

Hello @gruebel, 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 migrating the project's type checking infrastructure from mypy to ty. This involves updating pre-commit configurations, adjusting type ignore comments in the codebase, and managing dependencies to ensure a smooth transition to the new type checker. The change aims to leverage ty for improved type analysis and maintainability.

Highlights

  • Type Checker Migration: Replaced mypy with ty as the primary type checker, including updates to pre-commit hooks and project configuration.
  • Pre-commit Hook Updates: The mypy pre-commit hook has been removed and a new local ty check hook has been added. Additionally, the ruff-pre-commit version was updated from v0.14.3 to v0.14.10.
  • Dependency Updates: The ty package (ty>=0.0.4,<0.1.0) has been added to development dependencies in pyproject.toml and uv.lock. Several other dependencies in uv.lock were also updated, including cucumber-tag-expressions, cfgv, coverage, exceptiongroup, filelock, platformdirs, pre-commit, pytest, and pytest-asyncio.
  • Type Ignore Syntax Adjustment: Updated type: ignore comments to ty: ignore syntax in openfeature/client.py, tests/typechecking/evaluation_context.py, tests/typechecking/hook_data.py, and tests/typechecking/hook_hints.py to align with the new ty type checker.
  • Configuration Changes: The [tool.mypy] section was removed from pyproject.toml, and new [tool.ty.environment], [tool.ty.src], and [tool.ty.rules] configurations were added to support the ty type checker.

🧠 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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.84%. Comparing base (8fdd784) to head (d86441d).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #553      +/-   ##
==========================================
- Coverage   97.89%   97.84%   -0.05%     
==========================================
  Files          39       40       +1     
  Lines        1849     1855       +6     
==========================================
+ Hits         1810     1815       +5     
- Misses         39       40       +1     
Flag Coverage Δ
unittests 97.84% <100.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully replaces mypy with ty for static type checking. The changes are well-executed and cover all necessary adjustments, including updating the pre-commit configuration, modifying pyproject.toml to switch the dependency and configuration, and updating type ignore comments in the codebase to be compatible with ty. It's good to see that in some cases, ignore comments could be removed, indicating that ty handles certain type situations more effectively. The uv.lock file has also been updated to reflect these dependency changes. Overall, this is a solid chore update that modernizes the project's tooling.

@federicobond
Copy link
Member

While I love what the Astral team has been putting out recently, I'm in favor of waiting a bit more for ty to mature. I am not sure there is a clear benefit for us switching right now, but happy to discuss it more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants