From b69c38ac136e220ea2cb5a1c8543d22d79a4d2f0 Mon Sep 17 00:00:00 2001 From: Konstantin Fickel Date: Sat, 14 Feb 2026 16:50:55 +0100 Subject: [PATCH] fix: inline WriteConfig type alias in tests to fix nix flake check The tests.conftest import could not be resolved in the nix sandbox because tests is not a proper package. Define the WriteConfig type alias directly in test_builder.py and test_graph.py instead. --- tests/test_builder.py | 4 +++- tests/test_graph.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_builder.py b/tests/test_builder.py index 200569d..8dfdef9 100644 --- a/tests/test_builder.py +++ b/tests/test_builder.py @@ -2,6 +2,7 @@ from __future__ import annotations +from collections.abc import Callable from pathlib import Path from typing import override from unittest.mock import patch @@ -18,7 +19,8 @@ from bulkgen.builder import ( from bulkgen.config import ProjectConfig, TargetConfig, TargetType from bulkgen.providers import Provider from bulkgen.state import load_state -from tests.conftest import WriteConfig + +WriteConfig = Callable[[dict[str, object]], ProjectConfig] class FakeProvider(Provider): diff --git a/tests/test_graph.py b/tests/test_graph.py index e95a97e..e9d16f7 100644 --- a/tests/test_graph.py +++ b/tests/test_graph.py @@ -2,13 +2,15 @@ from __future__ import annotations +from collections.abc import Callable from pathlib import Path import pytest from bulkgen.config import ProjectConfig from bulkgen.graph import build_graph, get_build_order, get_subgraph_for_target -from tests.conftest import WriteConfig + +WriteConfig = Callable[[dict[str, object]], ProjectConfig] class TestBuildGraph: