This simplifies the commands as well as their associated tests - additional details can be found in the
Tooling Announcement.
For a taste of what our brand new, beautiful, modern future looks like, see the comparison between before:
@CommandProvider
class Foo(MachCommandBase):
@Command("foo", category="misc")
@CommandArgument("--bar")
def foo(self, bar):
print(self.topsrcdir, bar)
And after:
@Command("foo", category="misc")
@CommandArgument("--bar")
def foo(command_context, bar):
print(command_context.topsrcdir, bar)
I hope that this improvement will "Mach" your day better 😉
Thanks for your great work Alex!
--
Mitchell Hentges
Engineering Efficiency
Mozilla