From 404166f9eca2b99a6601faa3e32af2c472718124 Mon Sep 17 00:00:00 2001 From: Sanskar Jethi Date: Sun, 22 Mar 2026 13:58:14 +0000 Subject: [PATCH 1/2] fix: replace unused pydantic import with importlib.util.find_spec Silences ruff F401 that was failing the pre-commit CI. Made-with: Cursor --- integration_tests/test_pydantic.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/integration_tests/test_pydantic.py b/integration_tests/test_pydantic.py index 2ceff6a39..2661baffe 100644 --- a/integration_tests/test_pydantic.py +++ b/integration_tests/test_pydantic.py @@ -1,3 +1,5 @@ +import importlib.util + import pytest import requests @@ -5,12 +7,7 @@ BASE_URL = "http://127.0.0.1:8080" -try: - import pydantic - - _HAS_PYDANTIC = True -except ImportError: - _HAS_PYDANTIC = False +_HAS_PYDANTIC = importlib.util.find_spec("pydantic") is not None pytestmark = pytest.mark.skipif(not _HAS_PYDANTIC, reason="pydantic not installed") From 98c14c76e6fe928248b65c816a484fa98091ebda Mon Sep 17 00:00:00 2001 From: Sanskar Jethi Date: Sun, 22 Mar 2026 14:45:45 +0000 Subject: [PATCH 2/2] fix: sort imports in openapi.py to satisfy isort Made-with: Cursor --- robyn/openapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/robyn/openapi.py b/robyn/openapi.py index a8f5981d9..7383a3daf 100644 --- a/robyn/openapi.py +++ b/robyn/openapi.py @@ -9,9 +9,9 @@ from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Tuple, TypedDict, is_typeddict +from robyn.pydantic_support import get_pydantic_openapi_schema, is_pydantic_model from robyn.responses import html from robyn.robyn import QueryParams, Response -from robyn.pydantic_support import get_pydantic_openapi_schema, is_pydantic_model from robyn.types import Body, JsonBody _logger = logging.getLogger(__name__)