Skip to content

Commit e0d6b1b

Browse files
fix: correct import path and add type annotations
Co-Authored-By: Aaron <AJ> Steers <[email protected]>
1 parent 8d9ee65 commit e0d6b1b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

airbyte_cdk/test/pytest_config/plugin.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
import sys
55
from pathlib import Path
6-
from typing import Any, Callable, Dict, Generator, List, Optional, Tuple, Type, TypeVar, Union
6+
from typing import Any, Callable, Dict, Generator, List, Optional, Tuple, Type, TypeVar, Union, cast
77

88
import pytest
99
import yaml
@@ -12,14 +12,21 @@
1212
from _pytest.nodes import Item
1313
from _pytest.python import Metafunc, Module
1414

15+
from airbyte_cdk.sources import AbstractSource, Source
16+
from airbyte_cdk.sources.declarative.concurrent_declarative_source import ConcurrentDeclarativeSource
1517
from airbyte_cdk.test.declarative.models import ConnectorTestScenario
1618
from airbyte_cdk.test.declarative.test_suites.connector_base import ConnectorTestSuiteBase
1719
from airbyte_cdk.test.declarative.test_suites.destination_base import DestinationTestSuiteBase
1820
from airbyte_cdk.test.declarative.test_suites.source_base import SourceTestSuiteBase
1921

2022

21-
def pytest_collect_file(parent: pytest.Collector, path) -> Optional[Module]:
22-
"""Handle file collection for pytest."""
23+
def pytest_collect_file(parent: pytest.Collector, path: Any) -> Optional[Module]:
24+
"""Handle file collection for pytest.
25+
26+
Args:
27+
parent: The parent collector
28+
path: The path to the file being collected
29+
"""
2330
path_str = str(path)
2431
path_name = os.path.basename(path_str)
2532

0 commit comments

Comments
 (0)