You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
(craft-application) lengau@ratel:~/Work/Code/craft-application$ vi craft_application/services/provider.py
Could not find command-not-found database. Run 'sudo apt update' to populate it.
vi: command not found
Bug Description
The
ProviderService
class's__init__
takes awork_dir
argument, stored asself._work_dir
. SomeProviderService
methods use this, but others take their ownwork_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 withself._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 calledwork_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
The text was updated successfully, but these errors were encountered: