Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion google/cloud/pubsub_v1/publisher/_batch/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(
client: "PublisherClient",
topic: str,
settings: "types.BatchSettings",
batch_done_callback: Callable[[bool], Any] = None,
batch_done_callback: Optional[Callable[[bool], Any]] = None,
commit_when_full: bool = True,
commit_retry: "OptionalRetry" = gapic_v1.method.DEFAULT,
commit_timeout: "types.OptionalTimeout" = gapic_v1.method.DEFAULT,
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/pubsub_v1/publisher/futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def cancelled(self) -> bool:
"""
return False

def result(self, timeout: Union[int, float] = None) -> str:
def result(self, timeout: Union[int, float, None] = None) -> str:
"""Return the message ID or raise an exception.

This blocks until the message has been published successfully and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import logging
import queue
import time
from typing import Any, Callable, List, Sequence
from typing import Any, Callable, List, Sequence, Optional
import uuid


Expand All @@ -32,7 +32,7 @@


def _get_many(
queue_: queue.Queue, max_items: int = None, max_latency: float = 0
queue_: queue.Queue, max_items: Optional[int] = None, max_latency: float = 0
) -> List[Any]:
"""Get multiple items from a Queue.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def __init__(
client: "subscriber.Client",
subscription: str,
flow_control: types.FlowControl = types.FlowControl(),
scheduler: ThreadScheduler = None,
scheduler: Optional[ThreadScheduler] = None,
use_legacy_flow_control: bool = False,
await_callbacks_on_shutdown: bool = False,
):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/pubsub_v1/subscriber/futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def cancelled(self) -> bool:
"""
return False

def result(self, timeout: Union[int, float] = None) -> AcknowledgeStatus:
def result(self, timeout: Union[int, float, None] = None) -> AcknowledgeStatus:
"""Return a success code or raise an exception.

This blocks until the operation completes successfully and
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/pubsub_v1/subscriber/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def shutdown(
work_item = self._executor._work_queue.get(block=False)
if work_item is None: # Exceutor in shutdown mode.
continue
dropped_messages.append(work_item.args[0])
dropped_messages.append(work_item.args[0]) # type: ignore[index]
Comment thread
mukund-ananthu marked this conversation as resolved.
except queue.Empty:
pass

Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
ISORT_VERSION = "isort==5.11.0"
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

MYPY_VERSION = "mypy==0.910"
MYPY_VERSION = "mypy==1.10.0"

DEFAULT_PYTHON_VERSION = "3.8"

Expand Down
2 changes: 1 addition & 1 deletion owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
s.replace(
"noxfile.py",
r"LINT_PATHS = \[.*?\]",
'\g<0>\n\nMYPY_VERSION = "mypy==0.910"',
'\g<0>\n\nMYPY_VERSION = "mypy==1.10.0"',
)
s.replace(
"noxfile.py", r'"blacken",', '\g<0>\n "mypy",',
Expand Down