Skip to content

Commit

Permalink
Applied D401 to airbyte files. (#37370)
Browse files Browse the repository at this point in the history
  • Loading branch information
Satoshi-Sh authored Feb 13, 2024
1 parent 6754e9d commit b48280c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions airflow/providers/airbyte/hooks/airbyte.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async def get_headers_tenants_from_connection(self) -> tuple[dict[str, Any], str

async def get_job_details(self, job_id: int) -> Any:
"""
Uses Http async call to retrieve metadata for a specific job of an Airbyte Sync.
Use Http async call to retrieve metadata for a specific job of an Airbyte Sync.
:param job_id: The ID of an Airbyte Sync Job.
"""
Expand All @@ -97,7 +97,7 @@ async def get_job_details(self, job_id: int) -> Any:

async def get_job_status(self, job_id: int) -> str:
"""
Retrieves the status for a specific job of an Airbyte Sync.
Retrieve the status for a specific job of an Airbyte Sync.
:param job_id: The ID of an Airbyte Sync Job.
"""
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/airbyte/operators/airbyte.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def execute(self, context: Context) -> None:

def execute_complete(self, context: Context, event: Any = None) -> None:
"""
Callback for when the trigger fires - returns immediately.
Invoke this callback when the trigger fires; return immediately.
Relies on trigger to throw an exception, otherwise it assumes execution was
successful.
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/airbyte/sensors/airbyte.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def poke(self, context: Context) -> bool:
return False

def execute(self, context: Context) -> Any:
"""Submits a job which generates a run_id and gets deferred."""
"""Submit a job which generates a run_id and gets deferred."""
if not self.deferrable:
super().execute(context)
else:
Expand Down Expand Up @@ -139,7 +139,7 @@ def execute(self, context: Context) -> Any:

def execute_complete(self, context: Context, event: Any = None) -> None:
"""
Callback for when the trigger fires - returns immediately.
Invoke this callback when the trigger fires; return immediately.
Relies on trigger to throw an exception, otherwise it assumes execution was
successful.
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/airbyte/triggers/airbyte.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __init__(
self.poll_interval = poll_interval

def serialize(self) -> tuple[str, dict[str, Any]]:
"""Serializes AirbyteSyncTrigger arguments and classpath."""
"""Serialize AirbyteSyncTrigger arguments and classpath."""
return (
"airflow.providers.airbyte.triggers.airbyte.AirbyteSyncTrigger",
{
Expand Down
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1370,10 +1370,6 @@ combine-as-imports = true
"tests/providers/qdrant/operators/test_qdrant.py" = ["E402"]

# All the modules which do not follow D401 yet, please remove as soon as it becomes compatible
"airflow/providers/airbyte/hooks/airbyte.py" = ["D401"]
"airflow/providers/airbyte/operators/airbyte.py" = ["D401"]
"airflow/providers/airbyte/sensors/airbyte.py" = ["D401"]
"airflow/providers/airbyte/triggers/airbyte.py" = ["D401"]
"airflow/providers/common/io/xcom/backend.py" = ["D401"]
"airflow/providers/databricks/hooks/databricks.py" = ["D401"]
"airflow/providers/databricks/operators/databricks.py" = ["D401"]
Expand Down

0 comments on commit b48280c

Please sign in to comment.