File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 19
19
20
20
"""Interfaces for Pylint objects"""
21
21
from collections import namedtuple
22
- from typing import TYPE_CHECKING , Tuple
22
+ from typing import TYPE_CHECKING , Tuple , Type , Union
23
23
24
24
from astroid import nodes
25
25
26
26
if TYPE_CHECKING :
27
+ from pylint .checkers import BaseChecker
27
28
from pylint .reporters .ureports .nodes import Section
28
29
29
30
__all__ = (
@@ -59,7 +60,10 @@ def is_implemented_by(cls, instance):
59
60
return implements (instance , cls )
60
61
61
62
62
- def implements (obj : "Interface" , interface : Tuple [type , type ]) -> bool :
63
+ def implements (
64
+ obj : "BaseChecker" ,
65
+ interface : Union [Type ["Interface" ], Tuple [Type ["Interface" ], ...]],
66
+ ) -> bool :
63
67
"""Return whether the given object (maybe an instance or class) implements
64
68
the interface.
65
69
"""
You can’t perform that action at this time.
0 commit comments