mobiusml / aana_sdk

Aana SDK is a powerful framework for building AI enabled multimodal applications.
https://www.mobiuslabs.com/
Apache License 2.0
12 stars 1 forks source link

[ENHANCEMENT] Add __all__ Declarations to Improve Import Suggestions and Code Quality #126

Open movchan74 opened 3 weeks ago

movchan74 commented 3 weeks ago

Enhancement Description

The project currently lacks explicit __all__ declarations in many of its modules. This enhancement proposes the addition of __all__ attributes to relevant modules to improve import suggestions and code navigation in IDEs, particularly in Visual Studio Code with the Pylance extension.

Advantages

  1. Improved Import Suggestions:

    • By defining __all__, Pylance and other IDEs can provide more accurate import suggestions, enhancing the developer experience and reducing potential errors from incorrect imports.
  2. Clear Public API Definition:

    • Explicitly listing the public interface of each module makes the codebase easier to understand and maintain. This clarity helps both current and future contributors.
  3. Enhanced Code Navigation and IntelliSense:

    • Tools that rely on static analysis, like Pylance, will have better insights into the module's intended public API, leading to improved code navigation, autocomplete, and inline documentation.
  4. Encourages Best Practices:

    • Using __all__ promotes good coding practices by clearly distinguishing between public and private elements of the module.

Possible Implementation

  1. Identify Public Elements:

    • Review each module to identify which functions, classes, and variables should be exposed as part of the module's public API.
  2. Define __all__:

    • Add a __all__ attribute at the top of each module, listing the identified public elements.
    • Example:
      __all__ = ['public_function1', 'PublicClass1', 'public_variable1']