Skip to content

Commit 06ee399

Browse files
committed
fix: Address critical linting issues
- Add 'from None' to exception chains for B904 compliance in: - label_manager.py (FileNotFoundError) - Fix imports in snowflake_loader.py
1 parent 801548d commit 06ee399

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

src/amp/config/label_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def hex_to_binary(v):
123123
)
124124

125125
except FileNotFoundError:
126-
raise FileNotFoundError(f'Label CSV file not found: {csv_path}')
126+
raise FileNotFoundError(f'Label CSV file not found: {csv_path}') from None
127127
except Exception as e:
128128
raise ValueError(f"Failed to load label CSV '{csv_path}': {e}") from e
129129

src/amp/loaders/implementations/snowflake_loader.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -772,13 +772,6 @@ def connect(self) -> None:
772772
else:
773773
# Create dedicated connection (legacy behavior)
774774
# Set defaults for connection parameters
775-
default_params = {
776-
'login_timeout': 60,
777-
'network_timeout': 300,
778-
'socket_timeout': 300,
779-
'validate_default_parameters': True,
780-
'paramstyle': 'qmark',
781-
}
782775

783776
conn_params = {
784777
'account': self.config.account,

tests/integration/test_checkpoint_resume.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def test_processed_ranges_table_creation(self, checkpoint_db_connection):
406406
enabled=True,
407407
table_prefix='test_amp_',
408408
)
409-
store = DatabaseProcessedRangesStore(config, checkpoint_db_connection)
409+
DatabaseProcessedRangesStore(config, checkpoint_db_connection)
410410

411411
cursor = checkpoint_db_connection.cursor()
412412
cursor.execute("""

tests/integration/test_resilient_streaming.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def test_all_resilience_features_together(self):
362362
batch = pa.record_batch([[1]], schema=schema)
363363

364364
# Multiple successful loads with retries
365-
for i in range(3):
365+
for _i in range(3):
366366
# Reset failure mode for each iteration
367367
loader.current_attempt = 0
368368

0 commit comments

Comments
 (0)