chore: set up ruff as a new linter/formatter (#28158)

This commit is contained in:
Maxime Beauchemin
2024-04-24 17:19:53 -07:00
committed by GitHub
parent e8a678b75a
commit 2d63722150
579 changed files with 2508 additions and 2542 deletions

View File

@@ -40,9 +40,9 @@ class CustomEncFieldAdapter(AbstractEncryptedFieldAdapter):
class EncryptedFieldTest(SupersetTestCase):
def setUp(self) -> None:
self.app.config[
"SQLALCHEMY_ENCRYPTED_FIELD_TYPE_ADAPTER"
] = SQLAlchemyUtilsAdapter
self.app.config["SQLALCHEMY_ENCRYPTED_FIELD_TYPE_ADAPTER"] = (
SQLAlchemyUtilsAdapter
)
encrypted_field_factory.init_app(self.app)
super().setUp()
@@ -53,9 +53,9 @@ class EncryptedFieldTest(SupersetTestCase):
self.assertEqual(self.app.config["SECRET_KEY"], field.key)
def test_custom_adapter(self):
self.app.config[
"SQLALCHEMY_ENCRYPTED_FIELD_TYPE_ADAPTER"
] = CustomEncFieldAdapter
self.app.config["SQLALCHEMY_ENCRYPTED_FIELD_TYPE_ADAPTER"] = (
CustomEncFieldAdapter
)
encrypted_field_factory.init_app(self.app)
field = encrypted_field_factory.create(String(1024))
self.assertTrue(isinstance(field, StringEncryptedType))