From c3daf88339965fdda64eecdfc0250887b7a6f0cf Mon Sep 17 00:00:00 2001 From: Maxime Armstrong Date: Wed, 4 Dec 2024 14:12:55 -0500 Subject: [PATCH] Lint --- .../experimental/conftest.py | 78 ++++++------------- .../experimental/test_resources.py | 8 +- 2 files changed, 28 insertions(+), 58 deletions(-) diff --git a/python_modules/libraries/dagster-airbyte/dagster_airbyte_tests/experimental/conftest.py b/python_modules/libraries/dagster-airbyte/dagster_airbyte_tests/experimental/conftest.py index 45d0f283dfa77..f4820d4037871 100644 --- a/python_modules/libraries/dagster-airbyte/dagster_airbyte_tests/experimental/conftest.py +++ b/python_modules/libraries/dagster-airbyte/dagster_airbyte_tests/experimental/conftest.py @@ -2,7 +2,12 @@ import pytest import responses -from dagster_airbyte.resources import AIRBYTE_REST_API_BASE, AIRBYTE_REST_API_VERSION, AIRBYTE_SERVER_API_BASE, AIRBYTE_SERVER_API_VERSION +from dagster_airbyte.resources import ( + AIRBYTE_REST_API_BASE, + AIRBYTE_REST_API_VERSION, + AIRBYTE_SERVER_API_BASE, + AIRBYTE_SERVER_API_VERSION, +) TEST_WORKSPACE_ID = "some_workspace_id" TEST_CLIENT_ID = "some_client_id" @@ -49,87 +54,50 @@ "prefix": "string", "sourceId": "0c31738c-0b2d-4887-b506-e2cd1c39cc35", "destinationId": TEST_DESTINATION_ID, - "operationIds": [ - "1938d12e-b540-4000-8c46-1be33f00ab01" - ], + "operationIds": ["1938d12e-b540-4000-8c46-1be33f00ab01"], "syncCatalog": { "streams": [ { "stream": { "name": "string", "jsonSchema": {}, - "supportedSyncModes": [ - "full_refresh" - ], + "supportedSyncModes": ["full_refresh"], "sourceDefinedCursor": False, - "defaultCursorField": [ - "string" - ], - "sourceDefinedPrimaryKey": [ - [ - "string" - ] - ], + "defaultCursorField": ["string"], + "sourceDefinedPrimaryKey": [["string"]], "namespace": "string", - "isResumable": False + "isResumable": False, }, "config": { "syncMode": "full_refresh", - "cursorField": [ - "string" - ], + "cursorField": ["string"], "destinationSyncMode": "append", - "primaryKey": [ - [ - "string" - ] - ], + "primaryKey": [["string"]], "aliasName": "string", "selected": False, "suggested": False, "fieldSelectionEnabled": False, - "selectedFields": [ - { - "fieldPath": [ - "string" - ] - } - ], - "hashedFields": [ - { - "fieldPath": [ - "string" - ] - } - ], + "selectedFields": [{"fieldPath": ["string"]}], + "hashedFields": [{"fieldPath": ["string"]}], "mappers": [ { "id": "1938d12e-b540-4000-8ff0-46231e18f301", "type": "hashing", - "mapperConfiguration": {} + "mapperConfiguration": {}, } ], "minimumGenerationId": 0, "generationId": 0, - "syncId": 0 - } + "syncId": 0, + }, } ] }, - "schedule": { - "units": 0, - "timeUnit": "minutes" - }, + "schedule": {"units": 0, "timeUnit": "minutes"}, "scheduleType": "manual", "scheduleData": { - "basicSchedule": { - "timeUnit": "minutes", - "units": 0 - }, - "cron": { - "cronExpression": "string", - "cronTimeZone": "string" - } + "basicSchedule": {"timeUnit": "minutes", "units": 0}, + "cron": {"cronExpression": "string", "cronTimeZone": "string"}, }, "status": "active", "resourceRequirements": { @@ -138,7 +106,7 @@ "memory_request": "string", "memory_limit": "string", "ephemeral_storage_request": "string", - "ephemeral_storage_limit": "string" + "ephemeral_storage_limit": "string", }, "sourceCatalogId": "1938d12e-b540-4000-85a4-7ecc2445a901", "geography": "auto", @@ -148,7 +116,7 @@ "nonBreakingChangesPreference": "ignore", "created_at": 0, "backfillPreference": "enabled", - "workspaceId": "744cc0ed-7f05-4949-9e60-2a814f90c035" + "workspaceId": "744cc0ed-7f05-4949-9e60-2a814f90c035", } diff --git a/python_modules/libraries/dagster-airbyte/dagster_airbyte_tests/experimental/test_resources.py b/python_modules/libraries/dagster-airbyte/dagster_airbyte_tests/experimental/test_resources.py index e43ede804e602..6aa8f36fff365 100644 --- a/python_modules/libraries/dagster-airbyte/dagster_airbyte_tests/experimental/test_resources.py +++ b/python_modules/libraries/dagster-airbyte/dagster_airbyte_tests/experimental/test_resources.py @@ -8,9 +8,9 @@ from dagster_airbyte_tests.experimental.conftest import ( TEST_CLIENT_ID, TEST_CLIENT_SECRET, - TEST_WORKSPACE_ID, - TEST_DESTINATION_ID, TEST_CONNECTION_ID, + TEST_DESTINATION_ID, + TEST_WORKSPACE_ID, ) @@ -98,4 +98,6 @@ def test_basic_resource_request( assert "connections" in fetch_workspace_data_api_mocks.calls[1].request.url assert "connections/get" in fetch_workspace_data_api_mocks.calls[2].request.url assert TEST_CONNECTION_ID in fetch_workspace_data_api_mocks.calls[2].request.body.decode() - assert f"destinations/{TEST_DESTINATION_ID}" in fetch_workspace_data_api_mocks.calls[3].request.url + assert ( + f"destinations/{TEST_DESTINATION_ID}" in fetch_workspace_data_api_mocks.calls[3].request.url + )