From: Shamil Date: Fri, 18 Apr 2025 10:48:02 +0000 (+0300) Subject: refactor: remove unused variable assignments in tests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e752d92bafe24a6c03d92c49e8156462bd4a7ece;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git refactor: remove unused variable assignments in tests Cleaned up unnecessary variable assignments in test cases to reduce clutter and improve readability. No functional changes were made to the test logic. --- diff --git a/lib/sqlalchemy/testing/suite/test_dialect.py b/lib/sqlalchemy/testing/suite/test_dialect.py index ae67cc10ad..ebbb9e435a 100644 --- a/lib/sqlalchemy/testing/suite/test_dialect.py +++ b/lib/sqlalchemy/testing/suite/test_dialect.py @@ -537,7 +537,7 @@ class DifficultParametersTest(fixtures.TestBase): t.c[name].in_(["some name", "some other_name"]) ) - row = connection.execute(stmt).first() + connection.execute(stmt).first() @testing.fixture def multirow_fixture(self, metadata, connection): @@ -621,7 +621,7 @@ class ReturningGuardsTest(fixtures.TablesTest): f"current server capabilities does not support " f".*RETURNING when executemany is used", ): - result = connection.execute( + connection.execute( stmt, [ {id_param_name: 1, "data": "d1"}, diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py index faafe7dc57..5cf860c6a0 100644 --- a/lib/sqlalchemy/testing/suite/test_reflection.py +++ b/lib/sqlalchemy/testing/suite/test_reflection.py @@ -460,7 +460,7 @@ class QuotedNameArgumentTest(fixtures.TablesTest): is_true(isinstance(res, dict)) else: with expect_raises(NotImplementedError): - res = insp.get_table_options(name) + insp.get_table_options(name) @quote_fixtures @testing.requires.view_column_reflection @@ -2048,7 +2048,7 @@ class ComponentReflectionTest(ComparesTables, OneConnectionTablesTest): is_true(isinstance(res, dict)) else: with expect_raises(NotImplementedError): - res = insp.get_table_options("users", schema=schema) + insp.get_table_options("users", schema=schema) @testing.combinations((True, testing.requires.schemas), False) def test_multi_get_table_options(self, use_schema): @@ -2064,7 +2064,7 @@ class ComponentReflectionTest(ComparesTables, OneConnectionTablesTest): eq_(res, exp) else: with expect_raises(NotImplementedError): - res = insp.get_multi_table_options() + insp.get_multi_table_options() @testing.fixture def get_multi_exp(self, connection): diff --git a/lib/sqlalchemy/testing/suite/test_select.py b/lib/sqlalchemy/testing/suite/test_select.py index 79a371d88b..6b21bb67fe 100644 --- a/lib/sqlalchemy/testing/suite/test_select.py +++ b/lib/sqlalchemy/testing/suite/test_select.py @@ -1780,7 +1780,7 @@ class IdentityAutoincrementTest(fixtures.TablesTest): ) def test_autoincrement_with_identity(self, connection): - res = connection.execute(self.tables.tbl.insert(), {"desc": "row"}) + connection.execute(self.tables.tbl.insert(), {"desc": "row"}) res = connection.execute(self.tables.tbl.select()).first() eq_(res, (1, "row"))