]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Update type annotations in sqlalchemy.sql.elements
authorDzmitar <17720985+dzmitar@users.noreply.github.com>
Thu, 15 Dec 2022 17:28:31 +0000 (18:28 +0100)
committerDzmitar <17720985+dzmitar@users.noreply.github.com>
Thu, 15 Dec 2022 17:28:31 +0000 (18:28 +0100)
lib/sqlalchemy/sql/elements.py

index 3896d4cbd98862f81d0f1d81245d1f4bd6ad754e..608583dfd01d09084ef55426e1fbfc127f09e8e6 100644 (file)
@@ -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.
         """