diff --git a/poetry/console/config/application_config.py b/poetry/console/config/application_config.py index 2d9e04b6afc..9ca5f2adb7a 100644 --- a/poetry/console/config/application_config.py +++ b/poetry/console/config/application_config.py @@ -1,5 +1,7 @@ import logging +from typing import Any + from cleo.config import ApplicationConfig as BaseApplicationConfig from clikit.api.application.application import Application from clikit.api.args.raw_args import RawArgs @@ -43,8 +45,8 @@ def configure(self): self.add_event_listener(PRE_HANDLE, self.set_env) def register_command_loggers( - self, event, event_name, _ # type: PreHandleEvent # type: str - ): # type: (...) -> None + self, event, event_name, _ + ): # type: (PreHandleEvent, str, Any) -> None command = event.command.config.handler if not isinstance(command, Command): return @@ -72,7 +74,7 @@ def register_command_loggers( logger.setLevel(level) - def set_env(self, event, event_name, _): # type: (PreHandleEvent, str, _) -> None + def set_env(self, event, event_name, _): # type: (PreHandleEvent, str, Any) -> None from poetry.utils.env import EnvManager command = event.command.config.handler # type: EnvCommand diff --git a/poetry/puzzle/provider.py b/poetry/puzzle/provider.py index 40b54cda971..a077e28e91b 100644 --- a/poetry/puzzle/provider.py +++ b/poetry/puzzle/provider.py @@ -6,6 +6,7 @@ from contextlib import contextmanager from tempfile import mkdtemp +from typing import Any from typing import List from typing import Optional @@ -61,9 +62,7 @@ class Provider: UNSAFE_PACKAGES = {"setuptools", "distribute", "pip"} - def __init__( - self, package, pool, io # type: Package # type: Pool - ): # type: (...) -> None + def __init__(self, package, pool, io): # type: (Package, Pool, Any) -> None self._package = package self._pool = pool self._io = io