From: Lele Gaifax Date: Thu, 15 Dec 2022 07:51:55 +0000 (+0100) Subject: Rectify isinstance() check, using Range instead of dynamic class X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8985%2Fhead;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Rectify isinstance() check, using Range instead of dynamic class --- diff --git a/lib/sqlalchemy/dialects/postgresql/ranges.py b/lib/sqlalchemy/dialects/postgresql/ranges.py index 210b399499..609af5eb62 100644 --- a/lib/sqlalchemy/dialects/postgresql/ranges.py +++ b/lib/sqlalchemy/dialects/postgresql/ranges.py @@ -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: