Skip to content

Commit

Permalink
Merge pull request #1618 from hukkinj1/invalid-typehints
Browse files Browse the repository at this point in the history
Fix syntax errors in typehints
  • Loading branch information
finswimmer authored Dec 18, 2019
2 parents 00309a1 + 9eddf88 commit b30577d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 5 additions & 3 deletions poetry/console/config/application_config.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions poetry/puzzle/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from contextlib import contextmanager
from tempfile import mkdtemp
from typing import Any
from typing import List
from typing import Optional

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b30577d

Please sign in to comment.