temoa
temoa copied to clipboard
Fix incorrect Path method calls in save_lp function
The save_lp function in temoa/_internal/run_actions.py currently uses incorrect static method calls Path.is_dir(lp_path) and Path.mkdir(lp_path) instead of instance methods.
These should be changed to use the Path instance methods on the lp_path object directly (e.g., lp_path.is_dir() and lp_path.mkdir(parents=True, exist_ok=True)) to ensure directories are created correctly and prevent runtime errors when writing LP files to fresh directories.
This issue was identified during review of PR #165.
References:
- PR: https://github.com/TemoaProject/temoa/pull/165
- Comment: https://github.com/TemoaProject/temoa/pull/165#discussion_r2438054686
- Requested by: @ParticularlyPythonicBS