From 276f823de66164240cf25c237762d8af6d6c947a Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Sat, 6 Feb 2016 09:32:38 -0600 Subject: [PATCH] Add type annotations to flake8.utils for fun --- flake8/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flake8/utils.py b/flake8/utils.py index dd83748..98e5cea 100644 --- a/flake8/utils.py +++ b/flake8/utils.py @@ -5,6 +5,7 @@ import sys def parse_comma_separated_list(value): + # type: (Union[Sequence[str], str]) -> List[str] """Parse a comma-separated list. :param value: @@ -24,6 +25,7 @@ def parse_comma_separated_list(value): def normalize_paths(paths, parent=os.curdir): + # type: (Union[Sequence[str], str], str) -> List[str] """Parse a comma-separated list of paths. :returns: @@ -35,6 +37,7 @@ def normalize_paths(paths, parent=os.curdir): def normalize_path(path, parent=os.curdir): + # type: (str, str) -> str """Normalize a single-path. :returns: @@ -48,6 +51,7 @@ def normalize_path(path, parent=os.curdir): def stdin_get_value(): + # type: () -> str """Get and cache it so plugins can use it.""" cached_value = getattr(stdin_get_value, 'cached_stdin', None) if cached_value is None: