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