From 9e1c087ac525e84e4a038c8dd1475d7f8fd802fe Mon Sep 17 00:00:00 2001 From: Dzmitar <17720985+dzmitar@users.noreply.github.com> Date: Thu, 15 Dec 2022 18:28:31 +0100 Subject: [PATCH] Update type annotations in sqlalchemy.sql.elements --- lib/sqlalchemy/sql/elements.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index 3896d4cbd9..608583dfd0 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -582,7 +582,9 @@ class ClauseElement( """ return traversals.compare(self, other, **kw) - def self_group(self, against: Optional[OperatorType] = None) -> Any: + def self_group( + self, against: Optional[OperatorType] = None + ) -> ClauseElement: """Apply a 'grouping' to this :class:`_expression.ClauseElement`. This method is overridden by subclasses to return a "grouping" @@ -609,7 +611,7 @@ class ClauseElement( """ return self - def _ungroup(self): + def _ungroup(self) -> ClauseElement: """Return this :class:`_expression.ClauseElement` without any groupings. """ -- 2.47.3