]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Rectify isinstance() check, using Range instead of dynamic class 8985/head
authorLele Gaifax <lele@metapensiero.it>
Thu, 15 Dec 2022 07:51:55 +0000 (08:51 +0100)
committerLele Gaifax <lele@metapensiero.it>
Thu, 15 Dec 2022 07:51:55 +0000 (08:51 +0100)
lib/sqlalchemy/dialects/postgresql/ranges.py

index 210b399499496b3622ddee4e3f90368dfb692366..609af5eb6200084245d54125cdebbea2ee4798f0 100644 (file)
@@ -289,7 +289,7 @@ class Range(Generic[_T]):
         bounds inclusivity, returning ``True`` if they are equal.
         """
 
-        if not isinstance(other, self.__class__):
+        if not isinstance(other, Range):
             return NotImplemented
 
         if self.empty and other.empty: