Skip to content
19 changes: 10 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ dev = [
"pytest-timeout >=2.2.0",
"black >=24.3.0",
"flake8 >=6.1.0",
"isort >=5.12.0",
"isort >=7.0.0; python_version >= '3.10'",
"isort >=5.12.0, <7.0; python_version < '3.10'",
]

[project.urls]
Expand Down Expand Up @@ -87,17 +88,17 @@ coverage = ">=7.10.6"
pytest-django = "^4.5.2"
mypy = "^1.5.0"
bandit = "^1.7"
# pylint is conditionally installed based on Python version to maintain Python 3.9 compatibility
# Python 3.10+: pylint >=4.0.0 (use pip install -e ".[dev]" for conditional installation)
# Python 3.9: pylint >=2.0, <4.0
# Note: Poetry doesn't support multiple conditional version constraints for the same package.
# This entry uses the Python 3.9-compatible version. Python 3.10+ users can upgrade manually
# or use: pip install -e ".[dev]" which respects the conditional markers in [project.optional-dependencies]
pylint = ">=2.0,<4.0"
pylint = [
{version = ">=4.0.0", python = ">=3.10"},
{version = ">=2.0,<4.0", python = "<3.10"},
]
pycodestyle = "^2.0"
pytest-asyncio = "^0.26.0"
pytest-timeout = "^2.2.0"
black = "^26.0.0"
flake8 = "^7.0.0"
isort = "^8.0.0"
isort = [
{version = ">=7.0.0", python = ">=3.10"},
{version = ">=5.12.0,<7.0", python = "<3.10"},
]

6 changes: 5 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ coverage>=7.10.6
pytest-timeout>=2.2.0
black>=23.7.0
flake8>=6.1.0
isort>=5.12.0
# Note: isort version is conditional based on Python version
# Python 3.10+: isort >=7.0.0, Python 3.9: isort >=5.12.0, <7.0
# Conditional markers mirror pyproject.toml [project.optional-dependencies.dev]
isort>=7.0.0; python_version >= '3.10'
isort>=5.12.0,<7.0; python_version < '3.10'
mypy>=1.5.0
PyYAML>=6.0.1
twine>=4.0.2
Expand Down
3 changes: 3 additions & 0 deletions testv2/testv2_framework/test_fastapi_framework.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import unittest
from unittest.mock import AsyncMock, MagicMock, patch

pytest = __import__("pytest")
pytest.importorskip("fastapi", reason="fastapi not installed")

from fastapi import FastAPI
from starlette.testclient import TestClient
from starlette.middleware.sessions import SessionMiddleware
Expand Down
5 changes: 5 additions & 0 deletions testv2/testv2_framework/test_flask_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
import tempfile
import shutil
from unittest.mock import Mock, patch, call

pytest = __import__("pytest")
pytest.importorskip("flask", reason="flask not installed")
pytest.importorskip("flask_session", reason="flask-session not installed")

from flask import Flask
from kinde_flask.framework.flask_framework import FlaskFramework
from kinde_sdk.auth.oauth import OAuth
Expand Down
Loading