Skip to content

chore: fix mypy issue for __func__ type#2562

Open
ohmayr wants to merge 2 commits intomainfrom
fix-mypy-type-issue
Open

chore: fix mypy issue for __func__ type#2562
ohmayr wants to merge 2 commits intomainfrom
fix-mypy-type-issue

Conversation

@ohmayr
Copy link
Contributor

@ohmayr ohmayr commented Feb 7, 2026

No description provided.

@ohmayr ohmayr requested a review from a team as a code owner February 7, 2026 01:00
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Feb 7, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ohmayr, 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 code style and mypy compliance within the generated asynchronous client code. It introduces a multi-line formatting adjustment for the __func__ attribute assignment, which resolves a specific mypy type checking concern. This change is purely cosmetic and ensures that the codebase maintains high standards for static analysis and readability across various client implementations.

Highlights

  • Code Formatting: Reformatted the assignment of sa_info_func to span multiple lines for improved readability and adherence to style guidelines.
  • Mypy Compatibility: Addressed a mypy type checking issue related to the __func__ attribute by adjusting the line wrapping, ensuring better static analysis without functional changes.
  • Generated Code Consistency: Applied this formatting change consistently across the Jinja2 template for async clients and multiple generated golden async_client.py files.
Changelog
  • gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2
    • Reformatted the sa_info_func assignment to span multiple lines to resolve a mypy issue.
  • tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py
    • Reformatted the sa_info_func assignment to span multiple lines.
  • tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py
    • Reformatted the sa_info_func assignment to span multiple lines.
  • tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py
    • Reformatted the sa_info_func assignment to span multiple lines.
  • tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py
    • Reformatted the sa_info_func assignment to span multiple lines.
  • tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py
    • Reformatted the sa_info_func assignment to span multiple lines.
  • tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py
    • Reformatted the sa_info_func assignment to span multiple lines.
  • tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/async_client.py
    • Reformatted the sa_info_func assignment to span multiple lines.
  • tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/async_client.py
    • Reformatted the sa_info_func assignment to span multiple lines.
  • tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/async_client.py
    • Reformatted the sa_info_func assignment to span multiple lines.
  • tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py
    • Reformatted the sa_info_func assignment to span multiple lines.
  • tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/async_client.py
    • Reformatted the sa_info_func assignment to span multiple lines.
Activity
  • No specific review comments or activity have been recorded for this pull request yet.
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.

Copy link
Contributor

@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 reformats a line to fix a mypy issue. The change is correctly applied to the template and propagated to the generated golden files. I've added one comment about an inconsistency where the same fix should be applied to another method for completeness.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants