mirror of
https://github.com/trailofbits/algo.git
synced 2025-09-05 19:43:22 +02:00
Fix Python linting issues in test file
- Sort imports according to ruff standards - Remove trailing whitespace from blank lines - Remove unnecessary 'r' mode argument from open() - Add trailing newline at end of file All tests still pass after linting fixes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
95e9cd2b4d
commit
6d1f0640de
1 changed files with 31 additions and 31 deletions
|
@ -5,11 +5,11 @@ Verifies that get_aws_connection_info() works without the deprecated boto3 param
|
|||
Addresses issue #14822.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
from unittest.mock import patch, MagicMock
|
||||
import importlib.util
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
# Add the library directory to the path
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../library'))
|
||||
|
@ -112,7 +112,7 @@ class TestLightsailBoto3Fix(unittest.TestCase):
|
|||
"""Verify that boto3 parameter is not present in the source code."""
|
||||
lightsail_path = os.path.join(os.path.dirname(__file__), '../../library/lightsail_region_facts.py')
|
||||
|
||||
with open(lightsail_path, 'r') as f:
|
||||
with open(lightsail_path) as f:
|
||||
content = f.read()
|
||||
|
||||
# Check that boto3=True is not in the file
|
||||
|
@ -134,7 +134,7 @@ class TestLightsailBoto3Fix(unittest.TestCase):
|
|||
|
||||
lightsail_path = os.path.join(os.path.dirname(__file__), '../../library/lightsail_region_facts.py')
|
||||
|
||||
with open(lightsail_path, 'r') as f:
|
||||
with open(lightsail_path) as f:
|
||||
lines = f.readlines()
|
||||
|
||||
# Find the line that calls get_aws_connection_info
|
||||
|
|
Loading…
Add table
Reference in a new issue