Skip to content

Commit c810cfa

Browse files
committed
test: Add missing future annotations import to unit tests
1 parent 273c09f commit c810cfa

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

tests/unit/conftest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
from collections.abc import Iterable
1+
from __future__ import annotations
2+
23
from logging import getLogger
4+
from typing import TYPE_CHECKING
35

46
import pytest
57
from pytest_httpserver import HTTPServer
68

9+
if TYPE_CHECKING:
10+
from collections.abc import Iterable
11+
712

813
@pytest.fixture(scope='session')
914
def make_httpserver() -> Iterable[HTTPServer]:

tests/unit/test_http_clients.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
from __future__ import annotations
2+
13
import gzip
24
import time
3-
from collections.abc import Callable
45
from datetime import UTC, datetime, timedelta
5-
from typing import Any
6+
from typing import TYPE_CHECKING
67
from unittest.mock import Mock
78

89
import brotli
@@ -16,6 +17,10 @@
1617
from apify_client.http_compressors._brotli import BrotliHttpCompressor
1718
from apify_client.http_compressors._gzip import GzipHttpCompressor
1819

20+
if TYPE_CHECKING:
21+
from collections.abc import Callable
22+
from typing import Any
23+
1924

2025
class _ConcreteHttpClient(HttpClient):
2126
"""Minimal concrete HttpClient for testing base class helpers."""

tests/unit/test_statistics.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import pytest
24

35
from apify_client._statistics import ClientStatistics

0 commit comments

Comments
 (0)