{
"event": "PreToolUse",
"tool_name": "Bash",
"tool_input": {
"command": "echo \"=== Ruff Check ===\" && .\/venv\/bin\/ruff check . --exclude venv --exclude .mypy_cache 2>&1 | head -50",
"description": "Run ruff check on pipeline"
}
}
{
"tool_response": {
"stdout": "=== Ruff Check ===\nSIM102 Use a single `if` statement instead of nested `if` statements\n --> analyzers\/entity_extractor.py:123:13\n |\n121 | # Validate legacy entities too\n122 | for e in legacy_entities:\n123 | \/ if isinstance(e, dict) and \"name\" in e:\n124 | | if _validate_entity_in_text(e[\"name\"], source_text):\n | |____________________________________________________________________^\n125 | entities.append(e)\n126 | return entities\n |\nhelp: Combine `if` statements using `and`\n\nW292 [*] No newline at end of file\n --> analyzers\/entity_extractor.py:501:18\n |\n499 | result = cursor.fetchone()\n500 | cursor.close()\n501 | return result\n | ^\n |\nhelp: Add trailing newline\n\nC401 Unnecessary generator (rewrite as a set comprehension)\n --> analyzers\/entity_normalizer.py:56:27\n |\n55 | # Stopwords\n56 | self._stopwords = set(w.lower() for w in self.rules.get(\"stopwords\", []))\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n57 |\n58 | # Default type\n |\nhelp: Rewrite as a set comprehension\n\nI001 [*] Import block is un-sorted or un-formatted\n --> analyzers\/ontology_classifier.py:9:1\n |\n7 | sys.path.insert(0, \"\/var\/www\/scripts\/pipeline\")\n8 |\n9 | from db import db\n | ^^^^^^^^^^^^^^^^^\n |\nhelp: Organize imports\n\nF401 [*] `sys` imported but unused\n --> backfill_knowledge_semantics.py:17:8\n |\n15 | import argparse\n16 | import json\n17 | import sys",
"stderr": "",
"interrupted": false,
"isImage": false
}
}