diff --git a/src/starlite_saqlalchemy/service.py b/src/starlite_saqlalchemy/service.py index 8896d29f..242f1385 100644 --- a/src/starlite_saqlalchemy/service.py +++ b/src/starlite_saqlalchemy/service.py @@ -17,10 +17,9 @@ from starlite_saqlalchemy.repository.sqlalchemy import ModelT if settings.IS_SAQ_INSTALLED: + from starlite_saqlalchemy.worker import default_job_config_dict, queue # isort:skip from saq.job import Job - from starlite_saqlalchemy.worker import default_job_config_dict, queue - if TYPE_CHECKING: from collections.abc import AsyncIterator diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 880339b2..964f2603 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -1,3 +1,5 @@ +# pylint: disable=import-outside-toplevel + """Unit test specific config.""" from __future__ import annotations @@ -32,6 +34,7 @@ def job() -> Job: """SAQ Job instance.""" if settings.IS_SAQ_INSTALLED is False: pytest.skip("SAQ not available") + from saq.job import Job return Job(function="whatever", kwargs={"a": "b"})