Skip to content

Remove unused var and handle None type version - #543

Merged
TalShafir1 merged 1 commit into
mainfrom
mp/update-version-check
Feb 10, 2026
Merged

TalShafir1 merged 1 commit into
mainfrom
mp/update-version-check

Conversation

@TalShafir1

Copy link
Copy Markdown
Member

No description provided.

@TalShafir1
TalShafir1 requested a review from a team as a code owner February 10, 2026 17:33
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @TalShafir1, 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 enhancing the robustness and cleanliness of the mp tool. It primarily addresses potential issues with version handling by introducing explicit None type support and checks in the update mechanism, preventing errors when version information might be absent. Additionally, it includes a minor version bump and removes an unnecessary variable, contributing to overall code quality.

Highlights

  • Version Update: The mp package version has been incremented from 1.28.10 to 1.28.11 in pyproject.toml and uv.lock.
  • Improved Version Handling: Type hints for version strings across the update_checker.py module have been updated to explicitly allow None values, and logic has been added to safely handle None when comparing versions.
  • Code Cleanup: An unused typer.Context parameter and its associated assignment have been removed from the version_check function in main.py, streamlining the code.

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

Changelog
  • packages/mp/pyproject.toml
    • Updated the project version from 1.28.10 to 1.28.11.
  • packages/mp/src/mp/core/update_checker.py
    • Modified the current_version parameter in start_background_check and _check_update_worker to accept str | None.
    • Added explicit None checks for remote_version and current_version before version comparison in _check_update_worker.
    • Updated the type hint for current_version in _print_version_warning to str | None.
    • Changed the type hint for the version variable in print_mp_version to str | None.
    • Modified the return type hint of get_mp_version to str | None.
  • packages/mp/src/mp/main.py
    • Removed the unused ctx: typer.Context parameter from the version_check function.
    • Deleted the line ctx.obj = checker as ctx is no longer used.
  • packages/mp/uv.lock
    • Updated the locked version of the mp package from 1.28.10 to 1.28.11.
Activity
  • No specific review activity or comments were provided in the context.
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. ↩

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

Copy link
Copy Markdown
Contributor

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 removes an unused variable and updates type hints to handle cases where the application version might be None. However, there's an inconsistency: get_mp_version is typed to return str | None but its implementation still returns the string "unknown". My review provides a suggestion to make this behavior consistent across the codebase by using None uniformly.

Comment thread packages/mp/src/mp/core/update_checker.py
@TalShafir1 TalShafir1 added the mp mp related change label Feb 10, 2026
@TalShafir1
TalShafir1 merged commit 67bd43d into main Feb 10, 2026
32 of 33 checks passed
@TalShafir1
TalShafir1 deleted the mp/update-version-check branch February 10, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mp mp related change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant