Skip to content

Commit

Permalink
Remove explicit None check
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzthief committed Jan 24, 2023
1 parent 3748e7c commit b31e72c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/sqlalchemy/sql/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -2760,7 +2760,7 @@ def self_group(
self, against: Optional[OperatorType] = None
) -> ClauseElement:
if (
against is not None
against
and self.group
and operators.is_precedent(self.operator, against)
):
Expand Down Expand Up @@ -2789,7 +2789,7 @@ def self_group(
self, against: Optional[OperatorType] = None
) -> ColumnElement[Any]:
if (
against is not None
against
and self.group
and operators.is_precedent(self.operator, against)
or (
Expand Down Expand Up @@ -3654,7 +3654,7 @@ def self_group(
self, against: Optional[OperatorType] = None
) -> ColumnElement[Any]:
if (
against is not None
against
and self.operator
and operators.is_precedent(self.operator, against)
):
Expand Down Expand Up @@ -4393,9 +4393,7 @@ def over(
def self_group(
self, against: Optional[OperatorType] = None
) -> ColumnElement[_T]:
if against is not None and operators.is_precedent(
operators.filter_op, against
):
if against and operators.is_precedent(operators.filter_op, against):
return Grouping(self)
else:
return self
Expand Down

0 comments on commit b31e72c

Please sign in to comment.