style: fix pre-commit issues

- Fix trailing whitespace
- Fix import ordering with isort
- Apply autopep8 formatting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
pull/1157/head
Michael Walker 8 months ago
parent bb116151e7
commit 7b4956fc90

@ -8,51 +8,53 @@ Validates that all 11 new Agentcore icons can be imported and used correctly.
from diagrams import Diagram from diagrams import Diagram
from diagrams.aws.ml import ( from diagrams.aws.ml import (
Agentcore, Agentcore,
AiAgent, AiAgent,
Runtime, BrowserTool,
CodeInterpreter,
Evaluations,
Gateway, Gateway,
Identity, Identity,
CodeInterpreter,
Observability,
BrowserTool,
Memory, Memory,
Evaluations, Observability,
PolicyEngineAgenticGuardrails PolicyEngineAgenticGuardrails,
Runtime,
) )
def test_agentcore_icons(): def test_agentcore_icons():
"""Test all Agentcore icons in a sample diagram""" """Test all Agentcore icons in a sample diagram"""
with Diagram("AWS Agentcore Bedrock Icons Test", show=False, filename="agentcore_test"): with Diagram("AWS Agentcore Bedrock Icons Test", show=False, filename="agentcore_test"):
# Core Agentcore components # Core Agentcore components
agentcore = Agentcore("Agentcore") agentcore = Agentcore("Agentcore")
ai_agent = AiAgent("AI Agent") ai_agent = AiAgent("AI Agent")
runtime = Runtime("Runtime") runtime = Runtime("Runtime")
gateway = Gateway("Gateway") gateway = Gateway("Gateway")
# Identity and security # Identity and security
identity = Identity("Identity") identity = Identity("Identity")
policy_engine = PolicyEngineAgenticGuardrails("Policy Engine") policy_engine = PolicyEngineAgenticGuardrails("Policy Engine")
# Tools and capabilities # Tools and capabilities
code_interpreter = CodeInterpreter("Code Interpreter") code_interpreter = CodeInterpreter("Code Interpreter")
browser_tool = BrowserTool("Browser Tool") browser_tool = BrowserTool("Browser Tool")
memory = Memory("Memory") memory = Memory("Memory")
# Monitoring and evaluation # Monitoring and evaluation
observability = Observability("Observability") observability = Observability("Observability")
evaluations = Evaluations("Evaluations") evaluations = Evaluations("Evaluations")
# Create a flow showing the relationships # Create a flow showing the relationships
agentcore >> ai_agent >> runtime agentcore >> ai_agent >> runtime
ai_agent >> [code_interpreter, browser_tool, memory] ai_agent >> [code_interpreter, browser_tool, memory]
gateway >> identity >> policy_engine gateway >> identity >> policy_engine
[runtime, code_interpreter, browser_tool] >> observability [runtime, code_interpreter, browser_tool] >> observability
observability >> evaluations observability >> evaluations
print("✅ Test diagram created successfully!") print("✅ Test diagram created successfully!")
print("📁 Generated file: agentcore_test.png") print("📁 Generated file: agentcore_test.png")
print("🔍 Please verify the icons render correctly in the diagram") print("🔍 Please verify the icons render correctly in the diagram")
if __name__ == "__main__": if __name__ == "__main__":
test_agentcore_icons() test_agentcore_icons()

@ -8,15 +8,16 @@ Tests Amazon Nova, AWS App Studio, Amazon CodeWhisperer, and AWS Neuron
from diagrams import Diagram from diagrams import Diagram
from diagrams.aws.ml import AmazonNova, AWSAppStudio, AWSNeuron from diagrams.aws.ml import AmazonNova, AWSAppStudio, AWSNeuron
def test_nova_icons(): def test_nova_icons():
"""Test the new Nova and AI service icons""" """Test the new Nova and AI service icons"""
with Diagram("New AWS AI/ML Services", show=False, filename="nova_test"): with Diagram("New AWS AI/ML Services", show=False, filename="nova_test"):
# Create instances of the new services # Create instances of the new services
nova = AmazonNova("Amazon Nova") nova = AmazonNova("Amazon Nova")
app_studio = AWSAppStudio("AWS App Studio") app_studio = AWSAppStudio("AWS App Studio")
neuron = AWSNeuron("AWS Neuron") neuron = AWSNeuron("AWS Neuron")
# Create a simple flow # Create a simple flow
nova >> app_studio >> neuron nova >> app_studio >> neuron
@ -24,5 +25,6 @@ def test_nova_icons():
print("📁 Generated file: nova_test.png") print("📁 Generated file: nova_test.png")
print("🔍 Please verify the icons render correctly in the diagram") print("🔍 Please verify the icons render correctly in the diagram")
if __name__ == "__main__": if __name__ == "__main__":
test_nova_icons() test_nova_icons()

Loading…
Cancel
Save