commit 48c4b1793a4a43200ab0083e1ce959bf1c72f254 Author: vaydheesh Date: Thu Jul 4 22:19:07 2019 +0530 Fix: Issue 43 diff --git a/apertium/mode_search.py b/apertium/mode_search.py index 73c82a3..4992cb4 100644 --- a/apertium/mode_search.py +++ b/apertium/mode_search.py @@ -3,11 +3,10 @@ import re from apertium.utils import to_alpha3_code -if False: - from typing import Dict, List, Tuple, Union # noqa: F401 +from typing import Dict, List, Tuple, Union # noqa: F401 -def is_loop(dirpath, rootpath, real_root=None): # type: (str, str, Union[None, str]) -> bool +def is_loop(dirpath: str, rootpath: str, real_root: (Union[None, str]) = None) -> bool: """ Args: dirpath (str) @@ -39,7 +38,7 @@ def is_loop(dirpath, rootpath, real_root=None): # type: (str, str, Union[None, return False -def search_path(rootpath, include_pairs=True): # type: (str, bool) -> Dict[str, List[Tuple[str, str, str]]] +def search_path(rootpath: str, include_pairs: bool = True) -> Dict[str, List[Tuple[str, str, str]]]: """ Args: rootpath (str)