Skip to content

Commit c5ec7cd

Browse files
authored
Simplify to bool(...) (#34258)
1 parent 18eed91 commit c5ec7cd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

β€Žairflow/providers/amazon/aws/sensors/s3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def _defer(self) -> None:
157157
aws_conn_id=self.aws_conn_id,
158158
verify=self.verify,
159159
poke_interval=self.poke_interval,
160-
should_check_fn=True if self.check_fn else False,
160+
should_check_fn=bool(self.check_fn),
161161
),
162162
method_name="execute_complete",
163163
)

β€Žairflow/providers/google/cloud/triggers/bigquery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ async def _table_exists(
543543
dataset=dataset, table_id=table_id, project_id=project_id, session=session
544544
)
545545
response = await client.get()
546-
return True if response else False
546+
return bool(response)
547547
except ClientResponseError as err:
548548
if err.status == 404:
549549
return False

0 commit comments

Comments
 (0)