diff --git a/pyproject.toml b/pyproject.toml index 2a46fac..386aa17 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ line-length = 88 target-version = "py312" [tool.ruff.lint] -select = ["E", "F", "W", "I", "N", "UP", "B", "C4", "SIM", "C901", "FIX"] +select = ["E", "F", "W", "I", "N", "UP", "B", "C4", "SIM", "C901", "FIX", "BLE"] ignore = ["E501", "UP015", "B008"] [tool.ruff.lint.mccabe] diff --git a/tests/test_logging_thread_safety.py b/tests/test_logging_thread_safety.py index 9aef2eb..137fb6f 100644 --- a/tests/test_logging_thread_safety.py +++ b/tests/test_logging_thread_safety.py @@ -30,7 +30,7 @@ def call_setup(): try: barrier.wait(timeout=5) logging_module.setup_logging() - except Exception as e: + except Exception as e: # noqa: BLE001 - test collects any thread failure errors.append(e) threads = [threading.Thread(target=call_setup) for _ in range(10)] diff --git a/utils/llm/dspy_langfuse.py b/utils/llm/dspy_langfuse.py index d1bf7c2..91dd442 100644 --- a/utils/llm/dspy_langfuse.py +++ b/utils/llm/dspy_langfuse.py @@ -102,7 +102,7 @@ def on_module_end( # noqa outputs_extracted = dict(outputs.items()) except AttributeError: outputs_extracted = {"value": outputs} - except Exception as e: + except Exception as e: # noqa: BLE001 - observability fallback must never raise outputs_extracted = {"error_extracting_module_output": str(e)} get_client().update_current_span( input=self.input_field_values.get(None) or {},