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.
This commit is contained in:
parent
cf73511876
commit
b69c38ac13
2 changed files with 6 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Callable
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import override
|
from typing import override
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
@ -18,7 +19,8 @@ from bulkgen.builder import (
|
||||||
from bulkgen.config import ProjectConfig, TargetConfig, TargetType
|
from bulkgen.config import ProjectConfig, TargetConfig, TargetType
|
||||||
from bulkgen.providers import Provider
|
from bulkgen.providers import Provider
|
||||||
from bulkgen.state import load_state
|
from bulkgen.state import load_state
|
||||||
from tests.conftest import WriteConfig
|
|
||||||
|
WriteConfig = Callable[[dict[str, object]], ProjectConfig]
|
||||||
|
|
||||||
|
|
||||||
class FakeProvider(Provider):
|
class FakeProvider(Provider):
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,15 @@
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Callable
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from bulkgen.config import ProjectConfig
|
from bulkgen.config import ProjectConfig
|
||||||
from bulkgen.graph import build_graph, get_build_order, get_subgraph_for_target
|
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:
|
class TestBuildGraph:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue