← Back to issue list

Remove `work_dir` argument from `ProviderService` methods

View original Github issue

Metadata

Project
craft-application
Number
#606
Type
issue
State
open
Author
mattculler
Labels
Created
2025-01-15 17:08:38+00:00
Updated
2025-05-23 17:26:49+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### Bug Description The `ProviderService` class's `__init__` takes a `work_dir` argument, stored as `self._work_dir`. Some `ProviderService` methods use this, but others take their own `work_dir` and use that instead. This situation is confusing at best, a source of potential bugs at worst. Ideally, all `work_dir` arguments to methods can be removed and replaced with `self._work_dir`. If some method(s) actually do need a different work dir, perhaps the argument should be named something different? Or if it truly should be called `work_dir` and methods need to take their own, comment(s) illuminating the situation should be added. This same situation doesn't exist on other `service` classes. ### To Reproduce `vi craft_application/services/provider.py`

Evaluation history

No evaluation history available.