Skip to content

Commit cdc0eb3

Browse files
pvernierclaude
andcommitted
Fix black CI failure by pinning target-version and reformatting
Add [tool.black] target-version = ["py310", "py311", "py312"] to pyproject.toml so black does not default to the latest Python version (3.14), which cannot be parsed by the Python 3.12 CI runner. Apply the resulting reformats to test_form.py and test_utility.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 72a0094 commit cdc0eb3

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ build-backend = "hatchling.build"
3131

3232
[tool.hatch.build.targets.wheel]
3333
packages = ["pykobo"]
34+
35+
[tool.black]
36+
target-version = ["py310", "py311", "py312"]

tests/test_form.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,9 @@ def test_fetch_data_missing_columns_added(monkeypatch):
298298
"""Columns present in the survey but absent from the API response are added as NaN."""
299299
submissions_missing_col = [{"full_name": "Alice"}]
300300
f = _make_form()
301-
monkeypatch.setattr(requests, "get", _two_call_mock(_ASSET, submissions_missing_col))
301+
monkeypatch.setattr(
302+
requests, "get", _two_call_mock(_ASSET, submissions_missing_col)
303+
)
302304
f.fetch_data()
303305

304306
assert "gender" in f.data.columns

tests/test_utility.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ def test_reconcile_columns_null_criteria():
6868

6969

7070
def test_reconcile_columns_string_criteria():
71-
df = pd.DataFrame({"col1": ["n/a", "val1", "n/a"], "col2": ["val2", "val3", "val4"]})
71+
df = pd.DataFrame(
72+
{"col1": ["n/a", "val1", "n/a"], "col2": ["val2", "val3", "val4"]}
73+
)
7274
reconcile_columns(df, "col1", "col2", "result", criteria="n/a")
7375
assert list(df.columns) == ["result"]
7476
assert df["result"].tolist() == ["val2", "val1", "val4"]

0 commit comments

Comments
 (0)