Skip to content

Commit

Permalink
Add ColumnOperators.__hash__ (fixes #262) (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcljx authored Dec 30, 2023
1 parent 9a115e2 commit d71cd0e
Showing 1 changed file with 4 additions and 0 deletions.
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

0 comments on commit d71cd0e

Please sign in to comment.