typing: use forward reference for types defined later in file
@@ -28,10 +28,10 @@ if T.TYPE_CHECKING:
# Object holders need the actual interpreter
from ..interpreter import Interpreter
- __T = T.TypeVar('__T', bound=TYPE_var, contravariant=True)
+ __T = T.TypeVar('__T', bound='TYPE_var', contravariant=True)
class OperatorCall(Protocol[__T]):
- def __call__(self, other: __T) -> TYPE_var: ...
+ def __call__(self, other: __T) -> 'TYPE_var': ...
TV_fw_var = T.Union[str, int, bool, list, dict, 'InterpreterObject']
TV_fw_args = T.List[T.Union[mparser.BaseNode, TV_fw_var]]
