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 23, 2023
1 parent 311f445 commit ec9ac64
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 @@ -2754,7 +2754,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 @@ -2783,7 +2783,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 @@ -3623,7 +3623,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 @@ -4360,9 +4360,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 ec9ac64

Please sign in to comment.