|
57 | 57 | SelectiveCoreTestType, |
58 | 58 | SelectiveProvidersTestType, |
59 | 59 | SelectiveTaskSdkTestType, |
| 60 | + SelectiveTestType, |
60 | 61 | all_helm_test_packages, |
61 | 62 | all_selective_core_test_types, |
62 | 63 | providers_test_type, |
@@ -145,7 +146,7 @@ class AllProvidersSentinel: |
145 | 146 |
|
146 | 147 | ALL_PROVIDERS_SENTINEL = AllProvidersSentinel() |
147 | 148 |
|
148 | | -T = TypeVar("T", FileGroupForCi, SelectiveCoreTestType) |
| 149 | +T = TypeVar("T", FileGroupForCi, SelectiveTestType) |
149 | 150 |
|
150 | 151 |
|
151 | 152 | class HashableDict(dict[T, list[str]]): |
@@ -351,7 +352,7 @@ def __hash__(self): |
351 | 352 | r"^providers/tests/standard/operators/test_python.py", |
352 | 353 | ] |
353 | 354 |
|
354 | | -TEST_TYPE_MATCHES: HashableDict[SelectiveCoreTestType] = HashableDict( |
| 355 | +TEST_TYPE_MATCHES: HashableDict[SelectiveTestType] = HashableDict( |
355 | 356 | { |
356 | 357 | SelectiveCoreTestType.API: [ |
357 | 358 | r"^airflow-core/src/airflow/api/", |
@@ -423,7 +424,7 @@ def _exclude_files_with_regexps(files: tuple[str, ...], matched_files, exclude_r |
423 | 424 |
|
424 | 425 | @clearable_cache |
425 | 426 | def _matching_files( |
426 | | - files: tuple[str, ...], match_group: FileGroupForCi, match_dict: HashableDict |
| 427 | + files: tuple[str, ...], match_group: FileGroupForCi | SelectiveTestType, match_dict: HashableDict |
427 | 428 | ) -> list[str]: |
428 | 429 | matched_files: list[str] = [] |
429 | 430 | match_regexps = match_dict[match_group] |
@@ -819,7 +820,9 @@ def kubernetes_combos(self) -> list[str]: |
819 | 820 | def kubernetes_combos_list_as_string(self) -> str: |
820 | 821 | return " ".join(self.kubernetes_combos) |
821 | 822 |
|
822 | | - def _matching_files(self, match_group: FileGroupForCi, match_dict: HashableDict) -> list[str]: |
| 823 | + def _matching_files( |
| 824 | + self, match_group: FileGroupForCi | SelectiveTestType, match_dict: HashableDict |
| 825 | + ) -> list[str]: |
823 | 826 | return _matching_files(self._files, match_group, match_dict) |
824 | 827 |
|
825 | 828 | def _should_be_run(self, source_area: FileGroupForCi) -> bool: |
@@ -1027,9 +1030,7 @@ def prod_image_build(self) -> bool: |
1027 | 1030 | or self.run_ui_e2e_tests |
1028 | 1031 | ) |
1029 | 1032 |
|
1030 | | - def _select_test_type_if_matching( |
1031 | | - self, test_types: set[str], test_type: SelectiveCoreTestType |
1032 | | - ) -> list[str]: |
| 1033 | + def _select_test_type_if_matching(self, test_types: set[str], test_type: SelectiveTestType) -> list[str]: |
1033 | 1034 | matched_files = self._matching_files(test_type, TEST_TYPE_MATCHES) |
1034 | 1035 | count = len(matched_files) |
1035 | 1036 | if count > 0: |
@@ -1308,7 +1309,7 @@ def pyproject_toml_changed(self) -> bool: |
1308 | 1309 | try: |
1309 | 1310 | import tomllib |
1310 | 1311 | except ImportError: |
1311 | | - import tomli as tomllib |
| 1312 | + import tomli as tomllib # type: ignore[no-redef] |
1312 | 1313 |
|
1313 | 1314 | self._new_toml = tomllib.loads(new_result.stdout) |
1314 | 1315 | self._old_toml = tomllib.loads(old_result.stdout) |
@@ -1382,6 +1383,7 @@ def docs_list_as_string(self) -> str | None: |
1382 | 1383 | def skip_prek_hooks(self) -> str: |
1383 | 1384 | prek_hooks_to_skip = set() |
1384 | 1385 | prek_hooks_to_skip.add("identity") |
| 1386 | + prek_hooks_to_skip.add("update-uv-lock") |
1385 | 1387 | if self._default_branch != "main": |
1386 | 1388 | # Skip those tests on all "release" branches |
1387 | 1389 | prek_hooks_to_skip.update( |
@@ -1480,7 +1482,7 @@ def selected_providers_list_as_string(self) -> str | None: |
1480 | 1482 | return " ".join(sorted(p for p in affected_providers if p not in suspended)) |
1481 | 1483 |
|
1482 | 1484 | def get_job_label(self, event_type: str, branch: str): |
1483 | | - import requests |
| 1485 | + import requests # type: ignore[import-untyped] |
1484 | 1486 |
|
1485 | 1487 | job_name = "Basic tests" |
1486 | 1488 | workflow_name = "ci-amd-arm.yml" |
@@ -1728,7 +1730,7 @@ def provider_dependency_bump(self) -> bool: |
1728 | 1730 | try: |
1729 | 1731 | import tomllib |
1730 | 1732 | except ImportError: |
1731 | | - import tomli as tomllib |
| 1733 | + import tomli as tomllib # type: ignore[no-redef] |
1732 | 1734 |
|
1733 | 1735 | violations = [] |
1734 | 1736 | for pyproject_file in pyproject_files: |
|
0 commit comments