from collections.abc import Hashable
from typing import Self

from pandas.core.series import Series

from pandas._typing import Scalar

class Expression:
    # binary ops
    def __add__(self, other: Scalar | Series | Self) -> Expression: ...
    def __radd__(self, other: Scalar | Series | Self) -> Expression: ...
    def __sub__(self, other: Scalar | Series | Self) -> Expression: ...
    def __rsub__(self, other: Scalar | Series | Self) -> Expression: ...
    def __mul__(self, other: Scalar | Series | Self) -> Expression: ...
    def __rmul__(self, other: Scalar | Series | Self) -> Expression: ...
    def __truediv__(self, other: Scalar | Series | Self) -> Expression: ...
    def __rtruediv__(self, other: Scalar | Series | Self) -> Expression: ...
    def __floordiv__(self, other: Scalar | Series | Self) -> Expression: ...
    def __rfloordiv__(self, other: Scalar | Series | Self) -> Expression: ...
    def __ge__(self, other: Scalar | Series | Self) -> Expression: ...
    def __gt__(self, other: Scalar | Series | Self) -> Expression: ...
    def __le__(self, other: Scalar | Series | Self) -> Expression: ...
    def __lt__(self, other: Scalar | Series | Self) -> Expression: ...
    def __eq__(self, other: object) -> Expression: ...  # type: ignore[override]  # pyright: ignore[reportIncompatibleMethodOverride]  # ty: ignore[invalid-method-override]  # pyrefly: ignore[bad-override]
    def __ne__(self, other: object) -> Expression: ...  # type: ignore[override]  # pyright: ignore[reportIncompatibleMethodOverride]  # ty: ignore[invalid-method-override]  # pyrefly: ignore[bad-override]
    def __mod__(self, other: Scalar | Series | Self) -> Expression: ...
    def __rmod__(self, other: Scalar | Series | Self) -> Expression: ...

    # Logical ops
    def __and__(self, other: Scalar | Series | Self) -> Expression: ...
    def __rand__(self, other: Scalar | Series | Self) -> Expression: ...
    def __or__(self, other: Scalar | Series | Self) -> Expression: ...
    def __ror__(self, other: Scalar | Series | Self) -> Expression: ...
    def __xor__(self, other: Scalar | Series | Self) -> Expression: ...
    def __rxor__(self, other: Scalar | Series | Self) -> Expression: ...
    def __invert__(self) -> Expression: ...

def col(col_name: Hashable) -> Expression: ...
