Shorten Module.orchestrator and Orchestrator.console
`Orchestrator.console` was shortened to `Orchestrator.c` for convenience so that a function `@module def foo(o: Orchestrator, ...)` can just use `o.c.print` instead of `o.console.print`. Existing `class Foo(Module)` should still use `self.c` like before. Module.orchestrator was shortened to Module.o for convenience and consistency with `Module.c`.
This commit is contained in:
parent
5bb1105f38
commit
442f389b36
3 changed files with 10 additions and 15 deletions
|
|
@ -80,7 +80,7 @@ class Pacman(Module):
|
|||
return self._resolve_packages(groups, packages)
|
||||
|
||||
def _install_packages(self, packages: set[str]) -> None:
|
||||
if self.orchestrator.dry_run:
|
||||
if self.o.dry_run:
|
||||
return
|
||||
|
||||
if packages:
|
||||
|
|
@ -88,7 +88,7 @@ class Pacman(Module):
|
|||
self._pacman_execute("-D", "--asexplicit", *sorted(packages))
|
||||
|
||||
def _uninstall_packages(self, packages: set[str]) -> None:
|
||||
if self.orchestrator.dry_run:
|
||||
if self.o.dry_run:
|
||||
return
|
||||
|
||||
if packages:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue