summaryrefslogtreecommitdiff
path: root/pylint/typing.py
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2022-04-11 21:50:07 +0200
committerGitHub <noreply@github.com>2022-04-11 21:50:07 +0200
commit2c8ec14c3d81d55c3f3b01529cc174e25e7ad250 (patch)
tree9352012d1ca2a0004b384a748f65ecf8a7d158fe /pylint/typing.py
parent53deea2753cc0d15614e105e213edc8b9a9356c2 (diff)
downloadpylint-git-2c8ec14c3d81d55c3f3b01529cc174e25e7ad250.tar.gz
Create ``_OutputFormatAction`` (#6267)
Diffstat (limited to 'pylint/typing.py')
-rw-r--r--pylint/typing.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pylint/typing.py b/pylint/typing.py
index e62ac4d80..a1e4e5c0f 100644
--- a/pylint/typing.py
+++ b/pylint/typing.py
@@ -5,6 +5,7 @@
"""A collection of typing utilities."""
import sys
from typing import (
+ TYPE_CHECKING,
Any,
Callable,
Dict,
@@ -13,6 +14,7 @@ from typing import (
Optional,
Pattern,
Tuple,
+ Type,
Union,
)
@@ -21,6 +23,9 @@ if sys.version_info >= (3, 8):
else:
from typing_extensions import Literal, TypedDict
+if TYPE_CHECKING:
+ from pylint.config.callback_actions import _CallbackAction
+
class FileItem(NamedTuple):
"""Represents data about a file handled by pylint.
@@ -92,6 +97,8 @@ OptionDict = Dict[
int,
Pattern[str],
Iterable[Union[str, int, Pattern[str]]],
+ Type["_CallbackAction"],
+ Callable[[Any], Any],
Callable[[Any, Any, Any, Any], Any],
],
]