]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Drop inheritance from 'object' in sql module and tests
authorDenis Laxalde <denis.laxalde@dalibo.com>
Thu, 10 Jun 2021 11:24:10 +0000 (13:24 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 22 Jun 2021 09:48:23 +0000 (10:48 +0100)
psycopg3/psycopg3/sql.py
tests/test_sql.py

index 9859a885fe61bba17fe00dce31b28753487bc4cb..9b7ac125e4d5cb61e87d9556c4f1722618502773 100644 (file)
@@ -29,7 +29,7 @@ def quote(obj: Any, context: Optional[AdaptContext] = None) -> str:
     return Literal(obj).as_string(context)
 
 
-class Composable(object):
+class Composable:
     """
     Abstract base class for objects that can be used to compose an SQL string.
 
index b8f022e59ed5b109ba9f76da00c0e7ef4113a2f0..c1bf9e35978ec38257f5e9c53e7e6d40bf38d3ad 100644 (file)
@@ -105,7 +105,7 @@ class TestSqlFormat:
             sql.SQL("select {a:<};").format(a=10)
 
     def test_must_be_adaptable(self, conn):
-        class Foo(object):
+        class Foo:
             pass
 
         s = sql.SQL("select {0};").format(sql.Literal(Foo()))
@@ -262,7 +262,7 @@ class TestLiteral:
         assert sql.Literal("foo") != sql.SQL("foo")
 
     def test_must_be_adaptable(self, conn):
-        class Foo(object):
+        class Foo:
             pass
 
         with pytest.raises(ProgrammingError):