diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2019-06-30 21:21:25 +0900 |
---|---|---|
committer | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2019-07-17 20:38:52 +0900 |
commit | 8d12794def17889b9fd97ad872fe2c658e0770d9 (patch) | |
tree | 139d2c00212fedc84deaf458ac295b193074e664 | |
parent | 1c5127e575c07aabdcedeab700f749ac83a4c46b (diff) | |
download | deoplete.nvim-8d12794def17889b9fd97ad872fe2c658e0770d9.zip |
Fix type errors
-rw-r--r-- | rplugin/python3/deoplete/deoplete.py | 5 | ||||
-rw-r--r-- | 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: |