diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 794d0f132..4975f90d7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,4 +4,6 @@ repos: hooks: - id: ruff args: [--fix] + exclude: ^experiments/ - id: ruff-format + exclude: ^experiments/ diff --git a/headroom/prediction/feature_extractor.py b/headroom/prediction/feature_extractor.py index 3bca40f88..a3556e787 100644 --- a/headroom/prediction/feature_extractor.py +++ b/headroom/prediction/feature_extractor.py @@ -1155,7 +1155,9 @@ class StructuralExtractor(BaseFeatureExtractor): delimiters = self.DELIMITER.findall(text) features.delimiter_types = list({d[0] for d in delimiters if d}) features.has_structured_template = ( - features.xml_tag_count > 2 or bool(features.delimiter_types) or features.json_object_count > 0 + features.xml_tag_count > 2 + or bool(features.delimiter_types) + or features.json_object_count > 0 ) # Conversation structure diff --git a/tests/test_proxy_scalability.py b/tests/test_proxy_scalability.py index 1161f7ac8..6498fb5bf 100644 --- a/tests/test_proxy_scalability.py +++ b/tests/test_proxy_scalability.py @@ -224,8 +224,7 @@ class TestWorkerConfiguration: def test_uvicorn_workers_parameter(self): """Test that uvicorn accepts workers parameter.""" - # uvicorn.run accepts workers=N for multi-process - import uvicorn + uvicorn = pytest.importorskip("uvicorn") # Verify the Config class accepts workers config = uvicorn.Config( @@ -238,7 +237,7 @@ class TestWorkerConfiguration: def test_single_worker_default(self): """Test that default is single worker (None).""" - import uvicorn + uvicorn = pytest.importorskip("uvicorn") config = uvicorn.Config(app="app:app") # Default should be None (single process)