diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-04-02 08:07:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-02 08:07:40 +0200 |
commit | f3cca6eaf9821ff649383cd50ff6b9ca0a04ab4d (patch) | |
tree | 5539df2a26a63df43194e8fcb07dfd48ae6f9ddc /pylint/utils | |
parent | 06bc0a600309f5900ce446aaa4e9dca86faca590 (diff) | |
download | pylint-git-f3cca6eaf9821ff649383cd50ff6b9ca0a04ab4d.tar.gz |
Add typing to two utility functions (#6111)
Diffstat (limited to 'pylint/utils')
-rw-r--r-- | pylint/utils/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pylint/utils/utils.py b/pylint/utils/utils.py index bf2cb632d..1bb0c9130 100644 --- a/pylint/utils/utils.py +++ b/pylint/utils/utils.py @@ -23,6 +23,7 @@ from typing import ( List, Optional, Pattern, + Sequence, TextIO, Tuple, TypeVar, @@ -276,7 +277,7 @@ def get_global_option( return default -def _splitstrip(string, sep=","): +def _splitstrip(string: str, sep: str = ",") -> List[str]: """Return a list of stripped string by splitting the string given as argument on `sep` (',' by default), empty strings are discarded. @@ -314,7 +315,7 @@ def _unquote(string: str) -> str: return string -def _check_csv(value): +def _check_csv(value: Union[List[str], Tuple[str], str]) -> Sequence[str]: if isinstance(value, (list, tuple)): return value return _splitstrip(value) |