-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(AIR302): refactor regex usage
- Loading branch information
Showing
6 changed files
with
330 additions
and
294 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
crates/ruff_linter/resources/test/fixtures/airflow/AIR302_class_attribute.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
from airflow.datasets.manager import DatasetManager | ||
from airflow.lineage.hook import DatasetLineageInfo, HookLineageCollector | ||
from airflow.providers.amazon.auth_manager.aws_auth_manager import AwsAuthManager | ||
from airflow.providers.apache.beam.hooks import BeamHook, NotAir302HookError | ||
from airflow.providers.google.cloud.secrets.secret_manager import ( | ||
CloudSecretManagerBackend, | ||
) | ||
from airflow.providers.hashicorp.secrets.vault import NotAir302SecretError, VaultBackend | ||
from airflow.providers_manager import ProvidersManager | ||
from airflow.secrets.base_secrets import BaseSecretsBackend | ||
|
||
dm = DatasetManager() | ||
dm.register_dataset_change() | ||
dm.create_datasets() | ||
dm.notify_dataset_created() | ||
dm.notify_dataset_changed() | ||
dm.notify_dataset_alias_created() | ||
|
||
hlc = HookLineageCollector() | ||
hlc.create_dataset() | ||
hlc.add_input_dataset() | ||
hlc.add_output_dataset() | ||
hlc.collected_datasets() | ||
|
||
aam = AwsAuthManager() | ||
aam.is_authorized_dataset() | ||
|
||
pm = ProvidersManager() | ||
pm.initialize_providers_asset_uri_resources() | ||
pm.dataset_factories | ||
|
||
base_secret_backend = BaseSecretsBackend() | ||
base_secret_backend.get_conn_uri() | ||
base_secret_backend.get_connections() | ||
|
||
csm_backend = CloudSecretManagerBackend() | ||
csm_backend.get_conn_uri() | ||
csm_backend.get_connections() | ||
|
||
vault_backend = VaultBackend() | ||
vault_backend.get_conn_uri() | ||
vault_backend.get_connections() | ||
|
||
not_an_error = NotAir302SecretError() | ||
not_an_error.get_conn_uri() | ||
|
||
beam_hook = BeamHook() | ||
beam_hook.get_conn_uri() | ||
|
||
not_an_error = NotAir302HookError() | ||
not_an_error.get_conn_uri() | ||
|
||
provider_manager = ProvidersManager() | ||
provider_manager.dataset_factories | ||
provider_manager.dataset_uri_handlers | ||
provider_manager.dataset_to_openlineage_converters | ||
|
||
dl_info = DatasetLineageInfo() | ||
dl_info.dataset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.