Skip to content

Commit e3b1280

Browse files
committed
fix: in_buf -> in_buffer (ttfautohint-py API change); add pytest dev dep
1 parent 5f4060d commit e3b1280

4 files changed

Lines changed: 74 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ classifiers = [
2828
[project.urls]
2929
Homepage = "https://github.com/hellboxpy/hellbox-ttfautohint"
3030

31+
[dependency-groups]
32+
dev = ["pytest"]
33+
3134
[tool.setuptools.packages.find]
3235
where = ["src"]
3336
namespaces = true

src/hellbox/jobs/ttfautohint/autohint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ class Autohint(Chute):
99
def process(self, file):
1010
Hellbox.info(f"Autohinting: {file.name}")
1111
copy = file.copy()
12-
hinted = _autohint(in_buf=copy.read_bytes())
12+
hinted = _autohint(in_buffer=copy.read_bytes())
1313
copy.content_path.write_bytes(hinted)
1414
return copy

tests/hellbox/jobs/ttfautohint/test_autohint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ def test_process(self):
1818
result = Autohint().process(file)
1919

2020
file.copy.assert_called_once()
21-
mock_ta.assert_called_once_with(in_buf=b"fake ttf data")
21+
mock_ta.assert_called_once_with(in_buffer=b"fake ttf data")
2222
copy.content_path.write_bytes.assert_called_once_with(b"hinted ttf data")
2323
assert result is copy

uv.lock

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)