Commit b30577de by finswimmer Committed by GitHub

Merge pull request #1618 from hukkinj1/invalid-typehints

Fix syntax errors in typehints
parents 00309a16 9eddf88f
import logging import logging
from typing import Any
from cleo.config import ApplicationConfig as BaseApplicationConfig from cleo.config import ApplicationConfig as BaseApplicationConfig
from clikit.api.application.application import Application from clikit.api.application.application import Application
from clikit.api.args.raw_args import RawArgs from clikit.api.args.raw_args import RawArgs
...@@ -43,8 +45,8 @@ class ApplicationConfig(BaseApplicationConfig): ...@@ -43,8 +45,8 @@ class ApplicationConfig(BaseApplicationConfig):
self.add_event_listener(PRE_HANDLE, self.set_env) self.add_event_listener(PRE_HANDLE, self.set_env)
def register_command_loggers( def register_command_loggers(
self, event, event_name, _ # type: PreHandleEvent # type: str self, event, event_name, _
): # type: (...) -> None ): # type: (PreHandleEvent, str, Any) -> None
command = event.command.config.handler command = event.command.config.handler
if not isinstance(command, Command): if not isinstance(command, Command):
return return
...@@ -72,7 +74,7 @@ class ApplicationConfig(BaseApplicationConfig): ...@@ -72,7 +74,7 @@ class ApplicationConfig(BaseApplicationConfig):
logger.setLevel(level) 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 from poetry.utils.env import EnvManager
command = event.command.config.handler # type: EnvCommand command = event.command.config.handler # type: EnvCommand
......
...@@ -6,6 +6,7 @@ import time ...@@ -6,6 +6,7 @@ import time
from contextlib import contextmanager from contextlib import contextmanager
from tempfile import mkdtemp from tempfile import mkdtemp
from typing import Any
from typing import List from typing import List
from typing import Optional from typing import Optional
...@@ -61,9 +62,7 @@ class Provider: ...@@ -61,9 +62,7 @@ class Provider:
UNSAFE_PACKAGES = {"setuptools", "distribute", "pip"} UNSAFE_PACKAGES = {"setuptools", "distribute", "pip"}
def __init__( def __init__(self, package, pool, io): # type: (Package, Pool, Any) -> None
self, package, pool, io # type: Package # type: Pool
): # type: (...) -> None
self._package = package self._package = package
self._pool = pool self._pool = pool
self._io = io self._io = io
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment