Skip to content

Commit 15c8f2f

Browse files
committed
linted
1 parent 94272bc commit 15c8f2f

3 files changed

Lines changed: 5 additions & 11 deletions

File tree

examples/browser_use_checkout.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ def create_shopping_policy() -> str:
5959
resource: "*"
6060
effect: deny
6161
"""
62-
with tempfile.NamedTemporaryFile(
63-
mode="w", suffix="_shopping_policy.yaml", delete=False
64-
) as f:
62+
with tempfile.NamedTemporaryFile(mode="w", suffix="_shopping_policy.yaml", delete=False) as f:
6563
f.write(policy_content)
6664
return f.name
6765

examples/langchain_tool_guard.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515
import tempfile
1616

17+
from predicate_secure import SecureAgent
18+
1719
# Uncomment for actual LangChain usage
1820
# from langchain.agents import AgentExecutor, create_react_agent
1921
# from langchain_openai import ChatOpenAI
2022
# from langchain.tools import Tool
2123

22-
from predicate_secure import SecureAgent
23-
2424

2525
def create_tool_policy() -> str:
2626
"""Create a tool authorization policy."""
@@ -67,9 +67,7 @@ def create_tool_policy() -> str:
6767
resource: "*"
6868
effect: deny
6969
"""
70-
with tempfile.NamedTemporaryFile(
71-
mode="w", suffix="_tool_policy.yaml", delete=False
72-
) as f:
70+
with tempfile.NamedTemporaryFile(mode="w", suffix="_tool_policy.yaml", delete=False) as f:
7371
f.write(policy_content)
7472
return f.name
7573

examples/playwright_form_fill.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ def create_form_policy() -> str:
5757
resource: "*"
5858
effect: deny
5959
"""
60-
with tempfile.NamedTemporaryFile(
61-
mode="w", suffix="_form_policy.yaml", delete=False
62-
) as f:
60+
with tempfile.NamedTemporaryFile(mode="w", suffix="_form_policy.yaml", delete=False) as f:
6361
f.write(policy_content)
6462
return f.name
6563

0 commit comments

Comments
 (0)