Ejemplo n.º 1
0
    def __init__(self) -> None:
        super(Application, self).__init__("poetry", __version__)

        self._poetry = None

        dispatcher = EventDispatcher()
        dispatcher.add_listener(COMMAND, self.register_command_loggers)
        dispatcher.add_listener(COMMAND, self.set_env)
        dispatcher.add_listener(COMMAND, self.set_installer)
        self.set_event_dispatcher(dispatcher)

        command_loader = FactoryCommandLoader(
            {name: load_command(name)
             for name in COMMANDS})
        self.set_command_loader(command_loader)
Ejemplo n.º 2
0
    def __init__(self) -> None:
        super().__init__("poetry", __version__)

        self._poetry = None
        self._io: Optional[IO] = None
        self._disable_plugins = False
        self._plugins_loaded = False

        dispatcher = EventDispatcher()
        dispatcher.add_listener(COMMAND, self.register_command_loggers)
        dispatcher.add_listener(COMMAND, self.configure_env)
        dispatcher.add_listener(COMMAND, self.configure_installer)
        self.set_event_dispatcher(dispatcher)

        command_loader = CommandLoader({name: load_command(name) for name in COMMANDS})
        self.set_command_loader(command_loader)
Ejemplo n.º 3
0
def dispatcher():
    return EventDispatcher()