Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openagent_eval/exceptions/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if command:
if command is not None:
error_details["command"] = command

super().__init__(message=message, details=error_details)
Expand Down
4 changes: 2 additions & 2 deletions openagent_eval/exceptions/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if config_path:
if config_path is not None:
error_details["config_path"] = config_path
if field:
if field is not None:
error_details["field"] = field

super().__init__(message=message, details=error_details)
Expand Down
8 changes: 4 additions & 4 deletions openagent_eval/exceptions/corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if corpus_path:
if corpus_path is not None:
error_details["corpus_path"] = corpus_path

super().__init__(message=message, details=error_details)
Expand Down Expand Up @@ -72,7 +72,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if validation_errors:
if validation_errors is not None:
error_details["validation_errors"] = validation_errors

super().__init__(message=message, corpus_path=corpus_path, details=error_details)
Expand Down Expand Up @@ -100,9 +100,9 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if analyzer_name:
if analyzer_name is not None:
error_details["analyzer_name"] = analyzer_name
if original_error:
if original_error is not None:
error_details["original_error"] = str(original_error)

super().__init__(message=message, corpus_path=corpus_path, details=error_details)
Expand Down
6 changes: 3 additions & 3 deletions openagent_eval/exceptions/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if dataset_path:
if dataset_path is not None:
error_details["dataset_path"] = dataset_path

super().__init__(message=message, details=error_details)
Expand Down Expand Up @@ -79,7 +79,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if data_format:
if data_format is not None:
error_details["format"] = data_format
if line_number is not None:
error_details["line_number"] = line_number
Expand Down Expand Up @@ -112,7 +112,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if validation_errors:
if validation_errors is not None:
error_details["validation_errors"] = validation_errors

super().__init__(message=message, dataset_path=dataset_path, details=error_details)
Expand Down
6 changes: 3 additions & 3 deletions openagent_eval/exceptions/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if metric_name:
if metric_name is not None:
error_details["metric_name"] = metric_name

super().__init__(message=message, details=error_details)
Expand All @@ -52,7 +52,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if available_metrics:
if available_metrics is not None:
error_details["available_metrics"] = available_metrics

message = f"Metric not found: {metric_name}"
Expand Down Expand Up @@ -86,7 +86,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if original_error:
if original_error is not None:
error_details["original_error"] = str(original_error)

super().__init__(message=message, metric_name=metric_name, details=error_details)
Expand Down
6 changes: 3 additions & 3 deletions openagent_eval/exceptions/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if plugin_name:
if plugin_name is not None:
error_details["plugin_name"] = plugin_name

super().__init__(message=message, details=error_details)
Expand All @@ -52,7 +52,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if available_plugins:
if available_plugins is not None:
error_details["available_plugins"] = available_plugins

message = f"Plugin not found: {plugin_name}"
Expand Down Expand Up @@ -86,7 +86,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if original_error:
if original_error is not None:
error_details["original_error"] = str(original_error)

super().__init__(message=message, plugin_name=plugin_name, details=error_details)
Expand Down
8 changes: 4 additions & 4 deletions openagent_eval/exceptions/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if provider_name:
if provider_name is not None:
error_details["provider_name"] = provider_name

super().__init__(message=message, details=error_details)
Expand Down Expand Up @@ -68,7 +68,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if available_providers:
if available_providers is not None:
error_details["available_providers"] = available_providers

message = f"Provider not found: {provider_name}"
Expand Down Expand Up @@ -104,7 +104,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if original_error:
if original_error is not None:
error_details["original_error"] = str(original_error)

super().__init__(message=message, provider_name=provider_name, details=error_details)
Expand Down Expand Up @@ -136,7 +136,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if original_error:
if original_error is not None:
error_details["original_error"] = str(original_error)

super().__init__(message=message, provider_name=provider_name, details=error_details)
Expand Down
2 changes: 1 addition & 1 deletion openagent_eval/exceptions/synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(
details: Additional context about the error.
"""
error_details = details or {}
if original_error:
if original_error is not None:
error_details["original_error"] = str(original_error)

super().__init__(message=message, details=error_details)
Expand Down
Loading
Loading