diff options
author | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-04-06 19:56:49 +0200 |
---|---|---|
committer | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-04-06 20:10:40 +0200 |
commit | 651b37e1bc96be33b67dd220643a7ff90cbb19e6 (patch) | |
tree | 84f90fe3ba9a8446dd5dbbea4f257e266f31a852 /pylint/typing.py | |
parent | 0e7aec3b86ec0c67a4d41e70f9e381fe5ee0a296 (diff) | |
download | pylint-git-651b37e1bc96be33b67dd220643a7ff90cbb19e6.tar.gz |
Add ``Options`` and ``OptionsDict`` to typing utils
Diffstat (limited to 'pylint/typing.py')
-rw-r--r-- | pylint/typing.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pylint/typing.py b/pylint/typing.py index 32b2ac419..610640826 100644 --- a/pylint/typing.py +++ b/pylint/typing.py @@ -4,7 +4,7 @@ """A collection of typing utilities.""" import sys -from typing import NamedTuple, Optional, Union +from typing import Dict, Iterable, NamedTuple, Optional, Pattern, Tuple, Union if sys.version_info >= (3, 8): from typing import Literal, TypedDict @@ -71,3 +71,9 @@ MessageTypesFullName = Literal[ "convention", "error", "fatal", "info", "refactor", "statement", "warning" ] """All possible message categories.""" + + +OptionDict = Dict[ + str, Union[None, str, bool, int, Pattern[str], Iterable[Union[str, int]]] +] +Options = Tuple[Tuple[str, OptionDict], ...] |