Skip to content

Commit 538bd64

Browse files
committed
fix: remove unused method from BuildSpecification
1 parent 46ecbd3 commit 538bd64

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

src/corsair/_build.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from __future__ import annotations
44

5-
import json
65
from typing import TYPE_CHECKING
76

87
import yaml
@@ -30,13 +29,6 @@ def from_file(cls, path: Path) -> BuildSpecification:
3029
with path.open("r", encoding="utf-8") as f:
3130
return BuildSpecification(**yaml.safe_load(f))
3231

33-
@classmethod
34-
def to_json_schema_file(cls, path: Path) -> None:
35-
"""Write JSON schema to file."""
36-
with path.open("w") as f:
37-
schema = cls.model_json_schema()
38-
json.dump(schema, f)
39-
4032
model_config = ConfigDict(
4133
extra="forbid",
4234
use_attribute_docstrings=True,

tests/test_build.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from __future__ import annotations
44

5-
import json
65
from pathlib import Path
76

87
import pytest
@@ -100,16 +99,3 @@ def test_from_toml(tmp_path: Path) -> None:
10099
assert spec.loader.kind == "json"
101100
assert len(spec.generators) == 2
102101
assert spec.generators["vlog"].kind == "verilog"
103-
104-
105-
def test_to_json_schema(tmp_path: Path) -> None:
106-
"""Test writing JSON schema to file."""
107-
schema_file = tmp_path / "schema.json"
108-
csr.BuildSpecification.to_json_schema_file(schema_file)
109-
110-
with schema_file.open() as f:
111-
schema = json.load(f)
112-
113-
assert schema["title"] == "BuildSpecification"
114-
assert "loader" in schema["properties"]
115-
assert "generators" in schema["properties"]

0 commit comments

Comments
 (0)