Skip to content

Commit c9992da

Browse files
authored
fix(agent): remove unused get_variable_names function (#1784)
1 parent c6dc529 commit c9992da

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/smolagents/agents.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import importlib
1818
import json
1919
import os
20-
import re
2120
import tempfile
2221
import textwrap
2322
import time
@@ -98,11 +97,6 @@
9897
logger = getLogger(__name__)
9998

10099

101-
def get_variable_names(self, template: str) -> set[str]:
102-
pattern = re.compile(r"\{\{([^{}]+)\}\}")
103-
return {match.group(1).strip() for match in pattern.finditer(template)}
104-
105-
106100
def populate_template(template: str, variables: dict[str, Any]) -> str:
107101
compiled_template = Template(template, undefined=StrictUndefined)
108102
try:

0 commit comments

Comments
 (0)