Refactor: Remove duplicate code in actor/config.py #1394

Open
opened 2026-04-02 17:26:56 +00:00 by freemo · 0 comments
Owner

The load_yaml_text and load_blob_from_file methods in src/cleveragents/actor/config.py are almost identical. The _load_v2_yaml_content and _interpolate_env_vars are also very similar to the ones in src/cleveragents/action/schema.py. This is a clear violation of the DRY principle.

This should be refactored to remove the duplicate code. A single, reusable function should be created to handle the loading and parsing of YAML files.

The `load_yaml_text` and `load_blob_from_file` methods in `src/cleveragents/actor/config.py` are almost identical. The `_load_v2_yaml_content` and `_interpolate_env_vars` are also very similar to the ones in `src/cleveragents/action/schema.py`. This is a clear violation of the DRY principle. This should be refactored to remove the duplicate code. A single, reusable function should be created to handle the loading and parsing of YAML files.
freemo self-assigned this 2026-04-02 18:45:15 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#1394
No description provided.