Auto detected bugs - ontology
- Dominant language
- Python
- Stars
- 30
- Forks
- 3
- Avg merge
- 9h 28m
- Merged PRs (30d)
- 42
Description
🤖 Written by Claude
# Ontology App — Bug Report
## BUG 1: Returns single object instead of list — violates return type [MEDIUM]
**File:** `ontology/models/models_ontology.py` ~line 989
```python
def some_method(...) -> list['OntologySnake']:
...
return OntologySnake(source_term=ancestor, leaf_term=descendant) # BUG: returns object, not list
```
The declared return type is `list['OntologySnake']` but the function returns a bare `OntologySnake` instance. Any caller iterating over the result or calling list methods (`.append()`, `len()`, etc.) will get `AttributeError` or `TypeError`.
**Fix:**
Change the type annotation, or if that's right:
```python
return [OntologySnake(source_term=ancestor, leaf_term=descendant)]
```
---
## BUG 2: `found_term` assigned but never used — dead code / silent logic error [LOW]
**File:** `ontology/models/models_ontology.py` ~line 1228–1261
```python
found_term = some_lookup(...)
# found_term never referenced again
```
The variable is assigned but then the function proceeds without using it. This suggests either a missing `return found_term` or a conditional branch on `found_term` that was accidentally removed. Silent no-op for callers expecting the result.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.