Skip to content

chore: Add specific return type hints to file_system_toolkits functions #1595

@devin-ai-integration

Description

@devin-ai-integration

Description

Several functions in the file_system_toolkits module use generic dict return type hints instead of more specific dict[str, Any] type hints. Adding specific type hints improves code clarity and IDE support.

Files Affected

  • tools/src/aden_tools/tools/file_system_toolkits/list_dir/list_dir.py
  • tools/src/aden_tools/tools/file_system_toolkits/view_file/view_file.py
  • tools/src/aden_tools/tools/file_system_toolkits/write_to_file/write_to_file.py
  • tools/src/aden_tools/tools/file_system_toolkits/grep_search/grep_search.py

Current State

def list_dir(...) -> dict:

Expected State

from typing import Any

def list_dir(...) -> dict[str, Any]:

Rationale

  • Improved type safety and IDE autocomplete support
  • Consistent with Python typing best practices
  • Better documentation of function contracts

Submitted by: Himanshu Jha (@himanshu748)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions