Skip to content

Bug: delete_files return type annotation is wrong #569

Description

@gkorland

Description

In api/graph.py:408, the delete_files method is annotated as returning a tuple but actually returns None:

def delete_files(self, files: list[Path]) -> tuple[str, dict, list[int]]:
    # ... query logic ...
    return None

Impact

Type checkers and callers relying on the return type annotation will be misled. Any code unpacking the return value (e.g., a, b, c = graph.delete_files(...)) will fail at runtime.

Suggested Fix

Either fix the return type to -> None, or return the expected tuple.

Context

Found during code review of PR #522.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions