From 12e273847773eab73df2cae0a42c6a91239e4feb Mon Sep 17 00:00:00 2001 From: Sam Scott Date: Tue, 11 Jun 2024 16:59:47 -0500 Subject: [PATCH] Format --- .../python/sqlalchemy-oso/sqlalchemy_oso/sqlalchemy_utils.py | 1 + languages/python/sqlalchemy-oso/tests/models.py | 4 ++-- languages/python/sqlalchemy-oso/tests/test_flask.py | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/languages/python/sqlalchemy-oso/sqlalchemy_oso/sqlalchemy_utils.py b/languages/python/sqlalchemy-oso/sqlalchemy_oso/sqlalchemy_utils.py index ff9c9f9e53..d1c93e5819 100644 --- a/languages/python/sqlalchemy-oso/sqlalchemy_oso/sqlalchemy_utils.py +++ b/languages/python/sqlalchemy-oso/sqlalchemy_oso/sqlalchemy_utils.py @@ -9,6 +9,7 @@ import sqlalchemy from sqlalchemy import inspect from sqlalchemy.orm.util import AliasedClass, AliasedInsp + from .compat import USING_SQLAlchemy_v1_3, USING_SQLAlchemy_v2_0 diff --git a/languages/python/sqlalchemy-oso/tests/models.py b/languages/python/sqlalchemy-oso/tests/models.py index 3e76780a66..0327fb6c27 100644 --- a/languages/python/sqlalchemy-oso/tests/models.py +++ b/languages/python/sqlalchemy-oso/tests/models.py @@ -1,8 +1,8 @@ -from sqlalchemy_oso.compat import USING_SQLAlchemy_v1_3, USING_SQLAlchemy_v2_0 - from sqlalchemy import Boolean, Column, Enum, ForeignKey, Integer, String from sqlalchemy.orm import relationship +from sqlalchemy_oso.compat import USING_SQLAlchemy_v1_3, USING_SQLAlchemy_v2_0 + if USING_SQLAlchemy_v1_3: from sqlalchemy.ext.declarative import declarative_base else: diff --git a/languages/python/sqlalchemy-oso/tests/test_flask.py b/languages/python/sqlalchemy-oso/tests/test_flask.py index 6eceacc75f..48b01c4258 100644 --- a/languages/python/sqlalchemy-oso/tests/test_flask.py +++ b/languages/python/sqlalchemy-oso/tests/test_flask.py @@ -2,9 +2,9 @@ from sqlalchemy import Column, Integer from sqlalchemy.orm import Session +from sqlalchemy_oso.compat import USING_SQLAlchemy_v2_0 from sqlalchemy_oso.flask import AuthorizedSQLAlchemy from sqlalchemy_oso.session import Permissions -from sqlalchemy_oso.compat import USING_SQLAlchemy_v2_0 from .models import ModelBase, Post @@ -72,7 +72,6 @@ def test_authorized_sqlalchemy(ctx, oso, sqlalchemy, post_fixtures): assert sqlalchemy.session.query(Post).count() == 1 - @pytest.mark.skipif( USING_SQLAlchemy_v2_0, reason="flask sqlalchemy does not support 2.0" )