def print_version( self, event, event_name, dispatcher ): # type: (PreHandleEvent, str, EventDispatcher) -> None if event.args.is_option_set("version"): version = NameVersion(event.command.application.config) version.render(event.io) event.handled(True)
def _render_name(self, layout, application): # type: (BlockLayout, Application) -> None layout.add(NameVersion(application.config)) layout.add(EmptyLine())