Skip to content

Commit 470a156

Browse files
committed
feat: remove deprecated internal fields from configuration migration function
1 parent af7970d commit 470a156

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/repomix/config/config_load.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def migrate_config_format(config_dict: Dict[str, Any]) -> Dict[str, Any]:
1818
1919
This function handles backward compatibility by:
2020
- Converting '_style' to 'style' in output configuration
21+
- Removing deprecated internal fields like '_original_style' and '_style_enum'
2122
- Any other future migrations can be added here
2223
2324
Args:
@@ -45,6 +46,13 @@ def migrate_config_format(config_dict: Dict[str, Any]) -> Dict[str, Any]:
4546
del output_config["_style"]
4647
logger.info("Removed deprecated '_style' parameter (using 'style' instead)")
4748

49+
# Remove deprecated internal fields that should not be saved to configuration
50+
deprecated_fields = ["_original_style", "_style_enum"]
51+
for field in deprecated_fields:
52+
if field in output_config:
53+
del output_config[field]
54+
logger.info(f"Removed deprecated internal field '{field}' from configuration")
55+
4856
return migrated_config
4957

5058

0 commit comments

Comments
 (0)