From 05d8f82c80692b92f5e1312c3887145b36fc8046 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 26 Jan 2024 01:05:58 +0900 Subject: [PATCH] Bump hacking (again) The previous attempt did not update the version in pre commit config so the old version is still used by pep8 target. Change-Id: Ib4b2ee82bab8410b0b1f3a1e8a4e53cfb165e1d5 --- .pre-commit-config.yaml | 2 +- oslo_db/tests/sqlalchemy/test_sqlalchemy.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 08aef91b..9b908c6d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: - id: flake8 name: flake8 additional_dependencies: - - hacking>=3.0.1,<3.1.0 + - hacking>=6.1.0,<6.2.0 language: python entry: flake8 files: '^.*\.py$' diff --git a/oslo_db/tests/sqlalchemy/test_sqlalchemy.py b/oslo_db/tests/sqlalchemy/test_sqlalchemy.py index dc4e743c..790e3255 100644 --- a/oslo_db/tests/sqlalchemy/test_sqlalchemy.py +++ b/oslo_db/tests/sqlalchemy/test_sqlalchemy.py @@ -903,8 +903,8 @@ class MySQLConnectPingListenerTest(db_test_base._MySQLOpportunisticTestCase): def test__connect_ping_listener(self): for idx in range(2): with self.engine.begin() as conn: - self.assertTrue(isinstance(conn._transaction, - base_engine.RootTransaction)) + self.assertIsInstance(conn._transaction, + base_engine.RootTransaction) # TODO(ralonsoh): drop this check once SQLAlchemy minimum # version is 2.0. if compat.sqla_2: @@ -912,5 +912,5 @@ class MySQLConnectPingListenerTest(db_test_base._MySQLOpportunisticTestCase): self.assertIsNone(conn._transaction) else: engines._connect_ping_listener(conn, False) - self.assertTrue(isinstance(conn._transaction, - base_engine.RootTransaction)) + self.assertIsInstance(conn._transaction, + base_engine.RootTransaction)