diff --git a/mypy.ini b/mypy.ini index 181c47b1a9617..2388183e09ca5 100644 --- a/mypy.ini +++ b/mypy.ini @@ -8,15 +8,6 @@ ignore_errors=True [mypy-pandas.core.api] ignore_errors=True -[mypy-pandas.core.computation.expr] -ignore_errors=True - -[mypy-pandas.core.computation.ops] -ignore_errors=True - -[mypy-pandas.core.computation.pytables] -ignore_errors=True - [mypy-pandas.core.indexes.base] ignore_errors=True diff --git a/pandas/core/computation/expr.py b/pandas/core/computation/expr.py index b697ada21f6b9..b87ef465459b4 100644 --- a/pandas/core/computation/expr.py +++ b/pandas/core/computation/expr.py @@ -7,6 +7,7 @@ import itertools as it import operator import tokenize +from typing import Type import numpy as np @@ -327,7 +328,7 @@ class BaseExprVisitor(ast.NodeVisitor): parser : str preparser : callable """ - const_type = Constant + const_type = Constant # type: Type[Term] term_type = Term binary_ops = _cmp_ops_syms + _bool_ops_syms + _arith_ops_syms diff --git a/pandas/core/computation/ops.py b/pandas/core/computation/ops.py index c604bf45a6598..a79b1d1e58977 100644 --- a/pandas/core/computation/ops.py +++ b/pandas/core/computation/ops.py @@ -149,10 +149,6 @@ def value(self, new_value): def name(self): return self._name - @name.setter - def name(self, new_name): - self._name = new_name - @property def ndim(self): return self._value.ndim diff --git a/pandas/core/computation/pytables.py b/pandas/core/computation/pytables.py index 0a08123264fd7..7365eea26e005 100644 --- a/pandas/core/computation/pytables.py +++ b/pandas/core/computation/pytables.py @@ -56,7 +56,8 @@ def _resolve_name(self): except UndefinedVariableError: return self.name - @property + # read-only property overwriting read/write property + @property # type: ignore def value(self): return self._value