From 61f0d55d6bcb143586126ccc84f6363bc953e8a6 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Tue, 1 Sep 2020 00:26:32 -0500 Subject: [PATCH] TYP: add type annotation to expr.py #36027 --- pandas/core/computation/expr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/computation/expr.py b/pandas/core/computation/expr.py index 125ecb0d88036..5d0ea0f729514 100644 --- a/pandas/core/computation/expr.py +++ b/pandas/core/computation/expr.py @@ -6,7 +6,7 @@ from functools import partial, reduce from keyword import iskeyword import tokenize -from typing import Callable, Optional, Set, Tuple, Type, TypeVar +from typing import Callable, Dict, Optional, Set, Tuple, Type, TypeVar import numpy as np @@ -364,7 +364,7 @@ class BaseExprVisitor(ast.NodeVisitor): unary_ops = _unary_ops_syms unary_op_nodes = "UAdd", "USub", "Invert", "Not" - unary_op_nodes_map = dict(zip(unary_ops, unary_op_nodes)) + unary_op_nodes_map: Dict[str, str] = dict(zip(list(unary_ops), unary_op_nodes)) rewrite_map = { ast.Eq: ast.In,