From: Denis Laxalde Date: Thu, 10 Jun 2021 11:24:10 +0000 (+0200) Subject: Drop inheritance from 'object' in sql module and tests X-Git-Tag: 3.0.dev0~24^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8f4560ee3e949f4d9795a50369a4d1dae7ac5d4f;p=thirdparty%2Fpsycopg.git Drop inheritance from 'object' in sql module and tests --- diff --git a/psycopg3/psycopg3/sql.py b/psycopg3/psycopg3/sql.py index 9859a885f..9b7ac125e 100644 --- a/psycopg3/psycopg3/sql.py +++ b/psycopg3/psycopg3/sql.py @@ -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. diff --git a/tests/test_sql.py b/tests/test_sql.py index b8f022e59..c1bf9e359 100644 --- a/tests/test_sql.py +++ b/tests/test_sql.py @@ -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):