Skip to content

Commit fe30514

Browse files
committed
remove debugs
1 parent 015607e commit fe30514

File tree

1 file changed

+1
-53
lines changed

1 file changed

+1
-53
lines changed

scripts/generate_openapi.py

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ def parse_typescript_evaluators(file_path: str) -> Dict[str, Any]:
7878

7979
print(f"Processing evaluator: {evaluator_id}")
8080

81-
# Debug: Print content for competitor_blocklist
82-
if evaluator_id == "langevals/competitor_blocklist":
83-
print(f"DEBUG: Content for {evaluator_id}: {evaluator_content[:500]}")
84-
8581
return evaluators
8682

8783

@@ -197,15 +193,6 @@ def parse_settings(settings_content: str) -> Dict[str, Any]:
197193
# Extract default value
198194
default_value = extract_default_value(setting_content)
199195

200-
# Debug output for competitor_blocklist
201-
if setting_name == "competitors":
202-
print(f"DEBUG: Setting content for competitors: {setting_content}")
203-
print(f"DEBUG: Extracted default value: {default_value}")
204-
print(f"DEBUG: Type of default value: {type(default_value)}")
205-
print(
206-
f"DEBUG: Content contains 'competitors': {'competitors' in setting_content}"
207-
)
208-
209196
settings[setting_name] = {"description": description, "default": default_value}
210197

211198
return settings
@@ -229,16 +216,6 @@ def typescript_to_json(ts_str: str) -> str:
229216
def extract_default_value(content: str) -> Any:
230217
"""Extract default value from setting content."""
231218

232-
# Debug output (only for competitors field)
233-
if "competitors" in content:
234-
print(f"DEBUG: extract_default_value called with content: {content}")
235-
236-
# Debug output for categories field
237-
if "categories" in content:
238-
print(
239-
f"DEBUG: extract_default_value called with content for categories: {content}"
240-
)
241-
242219
# Look for default: followed by various value types
243220
# Use a more robust pattern that handles arrays and objects
244221
default_match = re.search(r"default:\s*(.+?)(?:,|$)", content, re.DOTALL)
@@ -247,12 +224,7 @@ def extract_default_value(content: str) -> Any:
247224

248225
value_str = default_match.group(1).strip()
249226

250-
# Debug output (only for competitors field)
251-
if "competitors" in content:
252-
print(f"DEBUG: Raw regex match: {default_match.group(0)}")
253-
print(f"DEBUG: Captured value: {value_str}")
254-
255-
# If it's an array or object, try to find the complete value
227+
# If it's an array or object, try to find the complete value
256228
if value_str.startswith("[") or value_str.startswith("{"):
257229
# Find the complete array/object by looking in the original content
258230
# Find the position of the opening bracket in the original content
@@ -282,30 +254,6 @@ def extract_default_value(content: str) -> Any:
282254

283255
value_str = complete_value
284256

285-
# Debug output (only for competitors field)
286-
if "competitors" in content:
287-
print(f"DEBUG: Original value_str: {default_match.group(1).strip()}")
288-
print(f"DEBUG: Complete value_str: {value_str}")
289-
290-
# Debug output for categories field
291-
if "categories" in content:
292-
print(
293-
f"DEBUG: Original value_str for categories: {default_match.group(1).strip()}"
294-
)
295-
print(f"DEBUG: Complete value_str for categories: {value_str}")
296-
else:
297-
# Debug output (only for competitors field)
298-
if "competitors" in content:
299-
print(f"DEBUG: Not an array/object, value_str: {value_str}")
300-
print(f"DEBUG: value_str starts with '[': {value_str.startswith('[')}")
301-
print(f"DEBUG: value_str starts with '{{': {value_str.startswith('{')}")
302-
303-
# Debug output for categories field
304-
if "categories" in content:
305-
print(f"DEBUG: Not an array/object, value_str for categories: {value_str}")
306-
print(f"DEBUG: value_str starts with '[': {value_str.startswith('[')}")
307-
print(f"DEBUG: value_str starts with '{{': {value_str.startswith('{')}")
308-
309257
# Handle different value types
310258
if value_str.startswith('"') and value_str.endswith('"'):
311259
# String value

0 commit comments

Comments
 (0)