|
3 | 3 | import os |
4 | 4 | import random |
5 | 5 | import sys |
| 6 | +from typing import Any, Iterable, Optional |
| 7 | +from collections.abc import Container |
6 | 8 | from unittest.mock import Mock |
7 | 9 |
|
8 | 10 | import pytest |
|
26 | 28 | except ImportError: |
27 | 29 | ReusableClient = None |
28 | 30 |
|
29 | | -from typing import TYPE_CHECKING |
30 | | - |
31 | | -if TYPE_CHECKING: |
32 | | - from collections.abc import Iterable, Container |
33 | | - from typing import Any, Optional |
34 | 31 |
|
35 | 32 | SANIC_VERSION = tuple(map(int, SANIC_VERSION_RAW.split("."))) |
36 | 33 | PERFORMANCE_SUPPORTED = SANIC_VERSION >= (21, 9) |
@@ -341,14 +338,13 @@ class TransactionTestConfig: |
341 | 338 |
|
342 | 339 | def __init__( |
343 | 340 | self, |
344 | | - integration_args, |
345 | | - url, |
346 | | - expected_status, |
347 | | - expected_transaction_name, |
348 | | - expected_source=None, |
349 | | - has_transaction_event=True, |
350 | | - ): |
351 | | - # type: (Iterable[Optional[Container[int]]], str, int, Optional[str], Optional[str], bool) -> None |
| 341 | + integration_args: Iterable[Optional[Container[int]]], |
| 342 | + url: str, |
| 343 | + expected_status: int, |
| 344 | + expected_transaction_name: Optional[str], |
| 345 | + expected_source: Optional[str] = None, |
| 346 | + has_transaction_event: bool = True, |
| 347 | + ) -> None: |
352 | 348 | """ |
353 | 349 | expected_transaction_name of None indicates we expect to not receive a transaction |
354 | 350 | """ |
@@ -408,8 +404,9 @@ def __init__( |
408 | 404 | ), |
409 | 405 | ], |
410 | 406 | ) |
411 | | -def test_transactions(test_config, sentry_init, app, capture_events): |
412 | | - # type: (TransactionTestConfig, Any, Any, Any) -> None |
| 407 | +def test_transactions( |
| 408 | + test_config: TransactionTestConfig, sentry_init: Any, app: Any, capture_events: Any |
| 409 | +) -> None: |
413 | 410 |
|
414 | 411 | # Init the SanicIntegration with the desired arguments |
415 | 412 | sentry_init( |
|
0 commit comments