Skip to content

Commit

Permalink
Simplify to bool(...) (#34258)
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajkoti committed Sep 10, 2023
1 parent 18eed91 commit c5ec7cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion airflow/providers/amazon/aws/sensors/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def _defer(self) -> None:
aws_conn_id=self.aws_conn_id,
verify=self.verify,
poke_interval=self.poke_interval,
should_check_fn=True if self.check_fn else False,
should_check_fn=bool(self.check_fn),
),
method_name="execute_complete",
)
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/google/cloud/triggers/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ async def _table_exists(
dataset=dataset, table_id=table_id, project_id=project_id, session=session
)
response = await client.get()
return True if response else False
return bool(response)
except ClientResponseError as err:
if err.status == 404:
return False
Expand Down

0 comments on commit c5ec7cd

Please sign in to comment.