From 3276460f6deb7c5784a8bead5d82ee08dd15a974 Mon Sep 17 00:00:00 2001 From: Alexander Akhmetov Date: Sun, 6 May 2018 12:18:24 +0200 Subject: [PATCH] Fix for mypy checks --- telegram/tdjson.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/telegram/tdjson.py b/telegram/tdjson.py index fb613b5b..e582e039 100644 --- a/telegram/tdjson.py +++ b/telegram/tdjson.py @@ -10,14 +10,14 @@ c_void_p, c_longlong, ) -from typing import Any, Dict +from typing import Any, Dict, Optional import pkg_resources logger = logging.getLogger(__name__) -def _get_tdjson_lib_path(): +def _get_tdjson_lib_path() -> str: if platform.system().lower() == 'darwin': lib_name = 'darwin/libtdjson.dylib' else: @@ -29,7 +29,7 @@ def _get_tdjson_lib_path(): class TDJson(object): - def __init__(self, library_path: str = None) -> None: + def __init__(self, library_path: Optional[str] = None) -> None: if library_path is None: library_path = _get_tdjson_lib_path() logger.info(f'Using shared library "{library_path}"')