mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
fix(ci): restore green lint gate on main
Merges of #564/#555 landed lint regressions that the old HF-429-masked CI hid: - I001 unsorted imports in tests/repro_unsendable_panic.py (#564) - ruff-format drift in helpers.py and code_compressor.py - mypy arg-type on get_language() in code_compressor.py (#564 dropped the type: ignore the old get_parser() call had) ruff check + ruff format --check + mypy headroom all green.
This commit is contained in:
parent
5f5f261a03
commit
fe50f9daed
3 changed files with 8 additions and 6 deletions
|
|
@ -841,9 +841,7 @@ def decide_compression_failure_action(
|
|||
frame_bytes=frame_bytes,
|
||||
)
|
||||
|
||||
if (client or "").strip().lower() == "codex" and isinstance(
|
||||
exception, asyncio.TimeoutError
|
||||
):
|
||||
if (client or "").strip().lower() == "codex" and isinstance(exception, asyncio.TimeoutError):
|
||||
return CompressionFailureAction(
|
||||
refuse=False,
|
||||
reason="client_override:codex",
|
||||
|
|
|
|||
|
|
@ -117,7 +117,9 @@ def _get_parser(language: str) -> Any:
|
|||
from tree_sitter_language_pack import get_language
|
||||
|
||||
parser = Parser()
|
||||
parser.language = get_language(language)
|
||||
# `language` is a validated runtime str; get_language types its arg
|
||||
# as a Literal of supported names, which a dynamic str can't satisfy.
|
||||
parser.language = get_language(language) # type: ignore[arg-type]
|
||||
parsers[language] = parser
|
||||
logger.debug(
|
||||
"Loaded tree-sitter parser for %s (thread %s)",
|
||||
|
|
@ -163,7 +165,9 @@ def unload_tree_sitter() -> bool:
|
|||
if parsers:
|
||||
count = len(parsers)
|
||||
parsers.clear()
|
||||
logger.info("Unloaded %d tree-sitter parsers (thread %s)", count, threading.current_thread().name)
|
||||
logger.info(
|
||||
"Unloaded %d tree-sitter parsers (thread %s)", count, threading.current_thread().name
|
||||
)
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ Usage:
|
|||
python repro_unsendable_panic.py
|
||||
"""
|
||||
|
||||
import threading
|
||||
import concurrent.futures
|
||||
import threading
|
||||
|
||||
CODE = b"def hello():\n return 42\n"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue