-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: fix mypy errors #15483
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
fix: fix mypy errors #15483
Conversation
Summary of ChangesHello @parthea, 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 addresses and resolves Highlights
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.
Code Review
This pull request addresses mypy errors by adding pandas-stubs to the test dependencies and using type: ignore to suppress errors related to optional dependencies and a known issue in python-storage. The changes are correct and effectively resolve the type checking failures. I've provided a few suggestions to make the type: ignore comments more specific by including the mypy error codes. This is a best practice that improves maintainability by ensuring that only specific errors are suppressed.
packages/google-cloud-automl/google/cloud/automl_v1beta1/services/tables/gcs_client.py
Outdated
Show resolved
Hide resolved
packages/google-cloud-automl/google/cloud/automl_v1beta1/services/tables/gcs_client.py
Outdated
Show resolved
Hide resolved
packages/google-cloud-automl/google/cloud/automl_v1beta1/services/tables/gcs_client.py
Outdated
Show resolved
Hide resolved
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release. Librarian Version: v0.0.0-20251218164811-cd2252e38d0a Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:56f26eaebaf1b4a9f174a72e00d091a1364997e17201dbad1aea099ddbda3a3e <details><summary>google-cloud-automl: 2.18.1</summary> ## [2.18.1](google-cloud-automl-v2.18.0...google-cloud-automl-v2.18.1) (2026-01-29) ### Bug Fixes * fix mypy errors (#15483) ([78eb0a1](78eb0a1d)) </details> <details><summary>google-cloud-compute: 1.43.0</summary> ## [1.43.0](google-cloud-compute-v1.42.0...google-cloud-compute-v1.43.0) (2026-01-29) ### Features * Update Compute Engine v1 API to revision 20251230 (#1144) ([e2fea25](e2fea25d)) </details> <details><summary>google-cloud-compute-v1beta: 0.6.0</summary> ## [0.6.0](google-cloud-compute-v1beta-v0.5.0...google-cloud-compute-v1beta-v0.6.0) (2026-01-29) ### Features * Update Compute Engine v1beta API to revision 20251230 (#1143) ([7260dd4](7260dd49)) </details> <details><summary>google-cloud-container: 2.63.0</summary> ## [2.63.0](google-cloud-container-v2.62.0...google-cloud-container-v2.63.0) (2026-01-29) ### Features * Add NodeDrainConfig to NodePool to configure node draining behavior (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * Add SwapConfig to enable and configure swap memory for node pools (PiperOrigin-RevId: 859731311) ([38754bb](38754bbd)) * Add fields for Rollback-Safe upgrades, including RollbackSafeUpgrade, CompatibilityStatus, and CompleteControlPlaneUpgrade RPC (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * Add SliceControllerConfig to AddonsConfig to manage the Slice Controller addon (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * Add GPUDirectConfig to configure GPU Direct for node pools (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * Allow specifying subnetwork in NodeNetworkConfig during node pool creation (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * Add consolidation_delay to configure Cluster Autoscaler node consolidation delay (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * Add SHORT_LIVED as a NodePoolUpdateStrategy (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * Add shutdown_grace_period_seconds and shutdown_grace_period_critical_pods_seconds to NodeKubeletConfig to configure graceful node shutdown for Spot VMs (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * Add RegistryHostConfig to ContainerdConfig for containerd registry host configuration (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * Add AutopilotGeneralProfile to ClusterAutoscaling to configure Autopilot profiles (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * Add ManagedOpenTelemetryConfig to Cluster to manage the OpenTelemetry pipeline (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * Add PodSnapshotConfig to AddonsConfig to manage Pod Snapshots (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * Add DRAINING status to AdditionalIPRangesConfig for subnet draining (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * Add DisruptionEvent to provide details on node disruption events (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) ### Documentation * A comment for field `gcp_secret_manager_certificate_config` in message `.google.container.v1.ContainerdConfig` is changed (PiperOrigin-RevId: 859731311) ([38754bb](38754bbd)) * A comment for field `services_ipv4_cidr` in message `.google.container.v1beta1.Cluster` is changed (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * A comment for field `node_ipv4_cidr_block` in message `.google.container.v1.IPAllocationPolicy` is changed (PiperOrigin-RevId: 859731311) ([38754bb](38754bbd)) * A comment for field `node_ipv4_cidr_block` in message `.google.container.v1beta1.IPAllocationPolicy` is changed (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * A comment for field `tpu_ipv4_cidr_block` in message `.google.container.v1.Cluster` is changed (PiperOrigin-RevId: 859731311) ([38754bb](38754bbd)) * A comment for field `subnetwork` in message `.google.container.v1beta1.NodeNetworkConfig` is changed (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * A comment for field `sysctls` in message `.google.container.v1.LinuxNodeConfig` is changed (PiperOrigin-RevId: 859731311) ([38754bb](38754bbd)) * A comment for field `services_ipv4_cidr_block` in message `.google.container.v1.IPAllocationPolicy` is changed (PiperOrigin-RevId: 859731311) ([38754bb](38754bbd)) * A comment for field `cluster_ipv4_cidr` in message `.google.container.v1.Cluster` is changed (PiperOrigin-RevId: 859731311) ([38754bb](38754bbd)) * A comment for field `services_ipv4_cidr_block` in message `.google.container.v1beta1.IPAllocationPolicy` is changed (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * A comment for field `cluster_ipv4_cidr` in message `.google.container.v1beta1.Cluster` is changed (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * A comment for field `services_ipv4_cidr` in message `.google.container.v1.Cluster` is changed (PiperOrigin-RevId: 859731311) ([38754bb](38754bbd)) * A comment for field `tpu_ipv4_cidr_block` in message `.google.container.v1.IPAllocationPolicy` is changed (PiperOrigin-RevId: 859731311) ([38754bb](38754bbd)) * A comment for field `recurrence` in message `.google.container.v1.RecurringTimeWindow` is changed (PiperOrigin-RevId: 859731311) ([38754bb](38754bbd)) * A comment for field `subnetwork` in message `.google.container.v1.NodeNetworkConfig` is changed (PiperOrigin-RevId: 859731311) ([38754bb](38754bbd)) * A comment for field `cluster_ipv4_cidr_block` in message `.google.container.v1beta1.IPAllocationPolicy` is changed (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * A comment for field `tpu_ipv4_cidr_block` in message `.google.container.v1beta1.Cluster` is change (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * A comment for field `tpu_ipv4_cidr_block` in message `.google.container.v1beta1.IPAllocationPolicy` is changed (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * A comment for field `cluster_ipv4_cidr_block` in message `.google.container.v1.IPAllocationPolicy` is changed (PiperOrigin-RevId: 859731311) ([38754bb](38754bbd)) * A comment for field `sysctls` in message `.google.container.v1beta1.LinuxNodeConfig` is changed (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) * A comment for field `enable_legacy_lustre_port` in message `.google.container.v1beta1.LustreCsiDriverConfig` is changed (PiperOrigin-RevId: 859828557) ([38754bb](38754bbd)) </details> <details><summary>google-cloud-documentai: 3.9.0</summary> ## [3.9.0](google-cloud-documentai-v3.8.0...google-cloud-documentai-v3.9.0) (2026-01-29) ### Documentation * Fixed language issues in multiple message field descriptions (PiperOrigin-RevId: 859310712) ([38754bb](38754bbd)) * Regenerated REST and RPC Document AI documentation to include missing changes from September 2024 to November 2025 (PiperOrigin-RevId: 859310712) ([38754bb](38754bbd)) </details> <details><summary>google-cloud-network-management: 1.32.0</summary> ## [1.32.0](google-cloud-network-management-v1.31.0...google-cloud-network-management-v1.32.0) (2026-01-29) ### Features * add fields and messages for GKE Pods and IP masquerading (PiperOrigin-RevId: 859595508) ([38754bb](38754bbd)) </details> <details><summary>google-cloud-quotas: 0.4.0</summary> ## [0.4.0](google-cloud-quotas-v0.3.0...google-cloud-quotas-v0.4.0) (2026-01-29) ### Documentation * Correct typo in comment for field `quota_id` (PiperOrigin-RevId: 859139909) ([38754bb](38754bbd)) </details> <details><summary>google-cloud-retail: 2.9.0</summary> ## [2.9.0](google-cloud-retail-v2.8.0...google-cloud-retail-v2.9.0) (2026-01-29) ### Features * add a user_attributes field in SearchRequest that can be used for personalization (PiperOrigin-RevId: 861314205) ([38754bb](38754bbd)) * add a model_scores field in SearchResponse.results to expose model quality signals (PiperOrigin-RevId: 861314205) ([38754bb](38754bbd)) </details> <details><summary>grafeas: 1.19.0</summary> ## [1.19.0](grafeas-v1.18.0...grafeas-v1.19.0) (2026-01-29) ### Features * A new field `last_vulnerability_update_time` is added to message `.grafeas.v1.DiscoveryOccurrence` (PiperOrigin-RevId: 861286340) ([38754bb](38754bbd)) </details>
Towards #15104
This is needed to unblock #15457 which has the following mypy failure for
google-cloud-automlSee follow up bug for
google-cloud-storage: googleapis/python-storage#318See follow up bug for pre-release failure: googleapis/proto-plus-python#558
See follow up bug to add
--strictflag for mypy: googleapis/gapic-generator-python#2089