From 0a9ed38d9e5e3f67efc0ecdc0d549d67ccb86fb8 Mon Sep 17 00:00:00 2001 From: Christopher Lott Date: Thu, 7 May 2026 22:44:59 +0200 Subject: remove dead code across frontend and backend - Remove TS ConfigurationManager class in configSchema.ts (called non-existent backend methods; only getDefaults() was used, replaced with direct import) - Remove Python update_config method and create_config_from_args (unreachable since plugin.py routes through update_config_from_dict; also carried a duplicate @staticmethod that would crash at runtime) - Delete configuration_helpers_generated.py entirely (all three functions were unused) - Remove their generators from generate_python_boilerplate.py - Remove dead generated code from config_schema_generated.py (create_config_dict, get_function_parameters, TOML_FIELDS, SCRIPT_FIELDS) - Remove duplicate import in config_schema.py - Remove unused config prop from UsageInstructions component --- py_modules/lsfg_vk/configuration.py | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'py_modules/lsfg_vk/configuration.py') diff --git a/py_modules/lsfg_vk/configuration.py b/py_modules/lsfg_vk/configuration.py index 74a3694..e479f43 100644 --- a/py_modules/lsfg_vk/configuration.py +++ b/py_modules/lsfg_vk/configuration.py @@ -8,7 +8,6 @@ from typing import Dict, Any from .base_service import BaseService from .config_schema import ConfigurationManager, CONFIG_SCHEMA, ProfileData, DEFAULT_PROFILE_NAME from .config_schema_generated import ConfigurationData, get_script_generation_logic -from .configuration_helpers_generated import log_configuration_update from .types import ConfigurationResponse, ProfilesResponse, ProfileResponse @@ -81,29 +80,6 @@ class ConfigurationService(BaseService): self.log.error(error_msg) return self._error_response(ConfigurationResponse, str(e), config=None) - def update_config(self, **kwargs) -> ConfigurationResponse: - """Update TOML configuration using generated schema - SIMPLIFIED WITH GENERATED CODE - - Args: - **kwargs: Configuration field values (see shared_config.py for available fields) - - Returns: - ConfigurationResponse with success status - """ - try: - config = ConfigurationManager.create_config_from_args(**kwargs) - - return self.update_config_from_dict(config) - - except (OSError, IOError) as e: - error_msg = f"Error updating lsfg config: {str(e)}" - self.log.error(error_msg) - return self._error_response(ConfigurationResponse, str(e), config=None) - except ValueError as e: - error_msg = f"Invalid configuration arguments: {str(e)}" - self.log.error(error_msg) - return self._error_response(ConfigurationResponse, str(e), config=None) - def update_lsfg_script(self, config: ConfigurationData) -> ConfigurationResponse: """Update the ~/lsfg launch script with current configuration -- cgit v1.2.3