Fix pre-commit issues: trailing whitespace and formatting

Co-authored-by: mingrammer <6178510+mingrammer@users.noreply.github.com>
pull/1187/head
copilot-swe-agent[bot] 2 weeks ago
parent e3cb9fee44
commit 52dd0fa84f

@ -65,7 +65,7 @@ find . -type f -name "*.svg" -exec bash -c 'inkscape -h 256 --export-filename="
find . -type f -name "*.svg" -exec bash -c 'rm "$0"' {} \;
```
If you get any errors with autogen, it will probably be a '+' in filename
If you get any errors with autogen, it will probably be a '+' in filename
### Add new provider

@ -38,6 +38,8 @@ class DiagnosticsSettings(_Monitor):
class LogAnalyticsWorkspaces(_Monitor):
_icon = "log-analytics-workspaces.png"
class Logs(_Monitor):
_icon = "logs.png"

@ -393,7 +393,7 @@ class ResourcesTest(unittest.TestCase):
_,
_ in os.walk(resources_dir))
self.assertLessEqual(max_depth, 2)
def test_resources_exist_and_render(self):
"""
Test that resources directory exists and icons can be loaded for rendering.
@ -401,38 +401,38 @@ class ResourcesTest(unittest.TestCase):
"""
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
# Verify resources directory exists
resources_dir = pathlib.Path(__file__).parent.parent / "resources"
self.assertTrue(resources_dir.exists(), "resources directory should exist")
# Verify AWS resources exist (sample check)
aws_compute_dir = resources_dir / "aws" / "compute"
self.assertTrue(aws_compute_dir.exists(), "AWS compute resources should exist")
# Verify icon files exist
ec2_icon = aws_compute_dir / "ec2.png"
self.assertTrue(ec2_icon.exists(), "EC2 icon should exist")
# Test that nodes can load their icons
test_diagram_name = "test_resources_render"
try:
with Diagram(test_diagram_name, show=False):
ec2_node = EC2("test-ec2")
rds_node = RDS("test-rds")
# Verify nodes have icon attributes set
self.assertIsNotNone(ec2_node._icon, "EC2 node should have an icon")
self.assertIsNotNone(rds_node._icon, "RDS node should have an icon")
# Verify icon paths are valid
ec2_icon_path = ec2_node._load_icon()
rds_icon_path = rds_node._load_icon()
self.assertTrue(os.path.exists(ec2_icon_path),
f"EC2 icon path should exist: {ec2_icon_path}")
self.assertTrue(os.path.exists(ec2_icon_path),
f"EC2 icon path should exist: {ec2_icon_path}")
self.assertTrue(os.path.exists(rds_icon_path),
f"RDS icon path should exist: {rds_icon_path}")
f"RDS icon path should exist: {rds_icon_path}")
finally:
# Clean up generated files
try:

Loading…
Cancel
Save