refactor: Remove deprecated ingredients_dir parameter from RecipeGenerator
Simplify RecipeGenerator.__init__() to accept only templates_file parameter.
The old two-argument pattern RecipeGenerator(ingredients_dir, templates_file)
is no longer supported. All existing code already uses the new single-argument
style.
Changes:
- Remove ingredients_dir_or_templates parameter
- Remove backward compatibility logic
- Remove unused Optional import
- Update DEVELOPMENT.md example
Migration: Change RecipeGenerator(Path('ingredients'), Path('templates.yaml'))
to RecipeGenerator(Path('templates.yaml'))
This commit is contained in:
+1
-1
@@ -836,7 +836,7 @@ from pathlib import Path
|
|||||||
import sys
|
import sys
|
||||||
sys.path.insert(0, '.')
|
sys.path.insert(0, '.')
|
||||||
from generate_recipe import RecipeGenerator
|
from generate_recipe import RecipeGenerator
|
||||||
gen = RecipeGenerator(Path('../ingredients'), Path('recipe_templates.yaml'))
|
gen = RecipeGenerator(Path('recipe_templates.yaml'))
|
||||||
print('Templates:', list(gen.templates.keys()))
|
print('Templates:', list(gen.templates.keys()))
|
||||||
"
|
"
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user