|
| 1 | +from __future__ import annotations |
| 2 | + |
1 | 3 | from functools import reduce
|
2 | 4 | from itertools import product
|
3 | 5 | import operator
|
4 |
| -from typing import ( |
5 |
| - Dict, |
6 |
| - List, |
7 |
| - Type, |
8 |
| -) |
9 | 6 | import warnings
|
10 | 7 |
|
11 | 8 | import numpy as np
|
@@ -147,8 +144,8 @@ def lhs(request):
|
147 | 144 |
|
148 | 145 | @td.skip_if_no_ne
|
149 | 146 | class TestEvalNumexprPandas:
|
150 |
| - exclude_cmp: List[str] = [] |
151 |
| - exclude_bool: List[str] = [] |
| 147 | + exclude_cmp: list[str] = [] |
| 148 | + exclude_bool: list[str] = [] |
152 | 149 |
|
153 | 150 | engine = "numexpr"
|
154 | 151 | parser = "pandas"
|
@@ -1125,7 +1122,7 @@ def test_performance_warning_for_poor_alignment(self, engine, parser):
|
1125 | 1122 |
|
1126 | 1123 | @td.skip_if_no_ne
|
1127 | 1124 | class TestOperationsNumExprPandas:
|
1128 |
| - exclude_arith: List[str] = [] |
| 1125 | + exclude_arith: list[str] = [] |
1129 | 1126 |
|
1130 | 1127 | engine = "numexpr"
|
1131 | 1128 | parser = "pandas"
|
@@ -1629,7 +1626,7 @@ def test_simple_in_ops(self):
|
1629 | 1626 |
|
1630 | 1627 | @td.skip_if_no_ne
|
1631 | 1628 | class TestOperationsNumExprPython(TestOperationsNumExprPandas):
|
1632 |
| - exclude_arith: List[str] = ["in", "not in"] |
| 1629 | + exclude_arith: list[str] = ["in", "not in"] |
1633 | 1630 |
|
1634 | 1631 | engine = "numexpr"
|
1635 | 1632 | parser = "python"
|
@@ -1723,7 +1720,7 @@ class TestOperationsPythonPython(TestOperationsNumExprPython):
|
1723 | 1720 |
|
1724 | 1721 |
|
1725 | 1722 | class TestOperationsPythonPandas(TestOperationsNumExprPandas):
|
1726 |
| - exclude_arith: List[str] = [] |
| 1723 | + exclude_arith: list[str] = [] |
1727 | 1724 |
|
1728 | 1725 | engine = "python"
|
1729 | 1726 | parser = "pandas"
|
@@ -1878,7 +1875,7 @@ def test_invalid_parser():
|
1878 | 1875 | pd.eval("x + y", local_dict={"x": 1, "y": 2}, parser="asdf")
|
1879 | 1876 |
|
1880 | 1877 |
|
1881 |
| -_parsers: Dict[str, Type[BaseExprVisitor]] = { |
| 1878 | +_parsers: dict[str, type[BaseExprVisitor]] = { |
1882 | 1879 | "python": PythonExprVisitor,
|
1883 | 1880 | "pytables": pytables.PyTablesExprVisitor,
|
1884 | 1881 | "pandas": PandasExprVisitor,
|
|
0 commit comments