Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ColumnOperators.__hash__ (fixes #262) #263

Merged
merged 1 commit into from
Dec 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sqlalchemy-stubs/sql/operators.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ class ColumnOperators(Operators[ColumnElement[_TE]], Generic[_TE]):
def __lt__(self, other: Any) -> ColumnElement[sqltypes.Boolean]: ...
def __le__(self, other: Any) -> ColumnElement[sqltypes.Boolean]: ...
def __eq__(self, other: Any) -> ColumnElement[sqltypes.Boolean]: ... # type: ignore[override]
# ColumnOperators defines an __eq__ so it must explicitly declare also
# an hash or it's set to None by python:
# https://docs.python.org/3/reference/datamodel.html#object.__hash__
def __hash__(self) -> int: ...
def __ne__(self, other: Any) -> ColumnElement[sqltypes.Boolean]: ... # type: ignore[override]
def is_distinct_from(
self, other: Any
Expand Down