Skip to content

Commit 66d2657

Browse files
committed
fix: reorder import statements for consistency and clarity
1 parent a706178 commit 66d2657

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/flowerpower/pipeline/runner.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from hamilton.registry import disable_autoload
1616
from hamilton.telemetry import disable_telemetry
1717
from hamilton_sdk.api.clients import UnauthorizedException
18-
from requests.exceptions import HTTPError,ConnectionError
18+
from requests.exceptions import ConnectionError, HTTPError
1919

2020
from .. import settings
2121

@@ -444,9 +444,8 @@ def run(
444444
if not isinstance(retry_exceptions, (tuple, list)):
445445
retry_exceptions = [retry_exceptions]
446446
retry_exceptions = [
447-
eval(exc) if isinstance(exc, str) else exc
448-
for exc in retry_exceptions]
449-
447+
eval(exc) if isinstance(exc, str) else exc for exc in retry_exceptions
448+
]
450449

451450
attempts = 1
452451
last_exception = None
@@ -479,7 +478,11 @@ def run(
479478

480479
return res
481480
except tuple(retry_exceptions) as e:
482-
if isinstance(e, HTTPError) or isinstance(e, UnauthorizedException) or isinstance(e, ConnectionError):
481+
if (
482+
isinstance(e, HTTPError)
483+
or isinstance(e, UnauthorizedException)
484+
or isinstance(e, ConnectionError)
485+
):
483486
if with_adapter_cfg["hamilton_tracker"]:
484487
logger.info(
485488
"Hamilton Tracker is enabled. Disabling tracker for the next run."

src/flowerpower/utils/misc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import msgspec
99

10-
1110
if importlib.util.find_spec("pyarrow"):
1211
import pyarrow as pa
1312

0 commit comments

Comments
 (0)