Skip to content

Comments

Merlin 1.2.1: Fixed Ruff checks and applied single responsability principal to lights setup.#4

Merged
Jake-Pullen merged 1 commit intomainfrom
bugfix/ruff_checks
Oct 27, 2025
Merged

Merlin 1.2.1: Fixed Ruff checks and applied single responsability principal to lights setup.#4
Jake-Pullen merged 1 commit intomainfrom
bugfix/ruff_checks

Conversation

@AtomicAlexD
Copy link
Member

This pull request refactors several modules to improve code clarity, maintainability, and consistency across the project, especially in configuration handling and the memory expert agent. It introduces better type annotations, enhances docstrings, and modularizes configuration update logic for Hue lights. Minor fixes and formatting improvements are also included.

Memory Agent and Expert Improvements

  • Refactored src/experts/memory.py to clarify docstrings, update type annotations to use modern Python syntax (e.g., dict[str, Any]), and improve method documentation and naming for consistency. [1] [2] [3]
  • Enhanced the consult_memory_expert method docstring in src/experts/orchestrator.py for better guidance and readability.

Hue Lights Configuration Refactor

  • Refactored src/setup/lights/hue_config_setup.py by modularizing config file loading, updating, and saving into helper functions (_load_config_file, _update_lights_config, _update_rooms_config, _save_config_file, _print_update_summary) and improved the main update_config function for better maintainability. [1] [2]
  • Renamed and enhanced the Hue lights configuration class from hue_lights to HueLights with improved docstrings and initialization logic.

General Code Quality and Consistency

  • Improved imports and formatting in configuration files (src/config/app_config.py, src/config/user_config_template.py), including alphabetizing imports and switching to double quotes for string literals. [1] [2]
  • Updated docstrings and streamlined logic in Hue bridge setup functions, such as simplifying environment variable checks and clarifying function return types. [1] [2] [3] [4]

Versioning

  • Bumped the project version from 1.2.0 to 1.2.1 in pyproject.toml to reflect these improvements.

…r memory.py and hue_config_setup.py for improved readability and structure
@Jake-Pullen Jake-Pullen merged commit c116a5a into main Oct 27, 2025
1 check passed
@Jake-Pullen Jake-Pullen deleted the bugfix/ruff_checks branch October 27, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants