Skip to content

Commit

Permalink
[dagster-fivetran] Fix format strings (#6436)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgasner committed Apr 12, 2022
1 parent 38625ae commit 7acd90e
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ def _assert_syncable_connector(self, connector_id: str):
"""
connector_details = self.get_connector_details(connector_id)
if connector_details["paused"]:
raise Failure("Connector '{connector_id}' cannot be synced as it is currently paused.")
raise Failure(f"Connector '{connector_id}' cannot be synced as it is currently paused.")
if connector_details["status"]["setup_state"] != "connected":
raise Failure("Connector '{connector_id}' cannot be synced as it has not been setup")
raise Failure(f"Connector '{connector_id}' cannot be synced as it has not been setup")

def get_connector_sync_status(self, connector_id: str) -> Tuple[datetime.datetime, bool, str]:
"""
Expand Down Expand Up @@ -185,7 +185,7 @@ def update_schedule_type(
Dict[str, Any]: Parsed json data representing the API response.
"""
if schedule_type not in ["auto", "manual"]:
check.failed("schedule_type must be either 'auto' or 'manual'.")
check.failed(f"schedule_type must be either 'auto' or 'manual': got '{schedule_type}'")
return self.update_connector(connector_id, properties={"schedule_type": schedule_type})

def get_connector_schema_config(self, connector_id: str) -> Dict[str, Any]:
Expand Down Expand Up @@ -289,7 +289,8 @@ def poll_sync(
seconds=poll_timeout
):
raise Failure(
f"Sync for connector '{connector_id}' timed out after {datetime.datetime.now() - poll_start}."
f"Sync for connector '{connector_id}' timed out after "
f"{datetime.datetime.now() - poll_start}."
)

# Sleep for the configured time interval before polling again.
Expand Down

0 comments on commit 7acd90e

Please sign in to comment.