Skip to content

Commit 0a06d35

Browse files
committed
make mypy happier
1 parent 05cbbe7 commit 0a06d35

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/test_pubsub.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import pytest
77
from google.api_core.exceptions import NotFound
88
from google.auth.exceptions import DefaultCredentialsError
9-
from google.cloud import pubsub_v1
9+
from google.cloud.pubsub_v1.publisher.futures import Future
1010

1111
import dapla.pubsub
1212
from dapla.pubsub import _extract_env
@@ -55,9 +55,7 @@ def test_publish_gcs_objects_to_pubsub(self, mock_list: Mock) -> None:
5555
)
5656

5757
def test_get_callback(self) -> None:
58-
publish_future = MagicMock(
59-
side_effect=pubsub_v1.publisher.futures.Future.result # type: ignore[attr-defined]
60-
)
58+
publish_future = MagicMock(side_effect=Future.result)
6159
# Create a callback function using the _get_callback helper function
6260
callback = _get_callback(publish_future, "blob_name", timeout=1)
6361

0 commit comments

Comments
 (0)