From 8d12794def17889b9fd97ad872fe2c658e0770d9 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Sun, 30 Jun 2019 21:21:25 +0900 Subject: Fix type errors --- rplugin/python3/deoplete/deoplete.py | 5 +++-- rplugin/python3/deoplete/logger.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/rplugin/python3/deoplete/deoplete.py b/rplugin/python3/deoplete/deoplete.py index 1ac7870..69eb333 100644 --- a/rplugin/python3/deoplete/deoplete.py +++ b/rplugin/python3/deoplete/deoplete.py @@ -29,7 +29,7 @@ class Deoplete(logger.LoggingMixin): self._runtimepath_list: typing.List[str] = [] self._custom: typing.Dict[str, typing.Dict[str, typing.Any]] = {} self._loaded_paths: typing.Set[str] = set() - self._prev_results: typng.Iterable[typing.Dict[int, Candidates]] = {} + self._prev_results: typing.Dict[int, Candidates] = {} self._prev_input = '' self._prev_next_input = '' self._context = None @@ -150,7 +150,8 @@ class Deoplete(logger.LoggingMixin): for cnt, parent in enumerate(self._parents): if cnt in self._prev_results: # Use previous result - results += copy.deepcopy(self._prev_results[cnt]) + results += copy.deepcopy( # type: ignore + self._prev_results[cnt]) else: result = parent.merge_results(context) is_async = is_async or result[0] diff --git a/rplugin/python3/deoplete/logger.py b/rplugin/python3/deoplete/logger.py index 5585119..f24a37d 100644 --- a/rplugin/python3/deoplete/logger.py +++ b/rplugin/python3/deoplete/logger.py @@ -68,7 +68,7 @@ def setup(vim: Nvim, level: str, output_file: str='') -> None: output_file)) -FUNC = typing.Callable[..., None] +FUNC = typing.Callable[..., typing.Any] def logmethod(func: FUNC) -> typing.Callable[[FUNC], FUNC]: """Decorator for setting up the logger in LoggingMixin subclasses. @@ -79,7 +79,7 @@ def logmethod(func: FUNC) -> typing.Callable[[FUNC], FUNC]: @wraps(func) def wrapper(self, # type: ignore *args: typing.Any, - **kwargs: typing.Any) -> None: + **kwargs: typing.Any) -> typing.Any: if not init or not self.is_debug_enabled: return if self._logger is None: -- cgit v1.2.3