fix: remove dead store and no-effect await flagged by CodeQL
- local_converter.py: remove redundant `_default_converter = None` in except block of `_ensure_default_converter` (variable was already None, re-raised immediately — dead store) - test_analysis_service.py: replace bare `await task` with `await asyncio.gather(task)` to satisfy static analysis
This commit is contained in:
parent
6d0c4dd192
commit
d8937ad916
2 changed files with 1 additions and 2 deletions
|
|
@ -120,7 +120,6 @@ def _ensure_default_converter() -> DoclingConverter:
|
|||
try:
|
||||
_default_converter = _build_docling_converter(ConversionOptions())
|
||||
except Exception:
|
||||
_default_converter = None
|
||||
raise
|
||||
return _default_converter
|
||||
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ class TestAnalysisServiceCancellation:
|
|||
task = asyncio.create_task(instant())
|
||||
service._running_tasks["j1"] = task
|
||||
task.add_done_callback(functools.partial(service._on_task_done, job_id="j1"))
|
||||
await task
|
||||
await asyncio.gather(task)
|
||||
|
||||
assert "j1" not in service._running_tasks
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue