Skip to content

ENH: Add missing return type annotations to utility methods#2700

Description

@Samearth17

Description

I noticed that several utility methods/functions in the codebase do not currently have explicit return type annotations.

Adding these annotations would improve static analysis, IDE support, and consistency with the existing typed codebase.

The main areas I noticed are:

  • src/smolagents/tools.py
  • src/smolagents/memory.py
  • src/smolagents/vision_web_browser.py

I have investigated these locations and prepared a small implementation that adds the missing return type annotations.

Before proceeding further, I wanted to confirm that this type of code-quality improvement is in scope and would be useful for the project, in accordance with the contribution guidelines.

Related work: #2676

Would a maintainer consider this issue for the status:accepted label if appropriate?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions