Skip to content

Commit 9cf7a83

Browse files
fix: resolve black formatting mismatch across Python versions
Reformat test_team_config.py with black 25.x (compatible with Python 3.8+). Cap black<26 in dev deps since black 26 requires Python 3.10+ and produces different output, breaking CI on Python 3.8/3.9. Made-with: Cursor
1 parent b99fe30 commit 9cf7a83

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dependencies = [
4040
dev = [
4141
"pytest>=7.0.0",
4242
"pytest-mock>=3.10.0",
43-
"black>=23.0.0",
43+
"black>=23.0.0,<26",
4444
"ruff>=0.1.0",
4545
]
4646

tests/test_team_config.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ def test_load_team_mapping_empty(tmp_path, monkeypatch):
3737
def test_load_team_mapping_text_format(tmp_path, monkeypatch):
3838
"""Test load_team_mapping from teams.yaml with [Team] dev1 dev2 format."""
3939
teams_file = tmp_path / "teams.yaml"
40-
teams_file.write_text("""
40+
teams_file.write_text(
41+
"""
4142
[Platform] alice bob charlie
4243
[Backend] dave eve
43-
""")
44+
"""
45+
)
4446
monkeypatch.chdir(tmp_path)
4547
mapping = load_team_mapping(tmp_path)
4648
assert mapping == {
@@ -55,10 +57,12 @@ def test_load_team_mapping_text_format(tmp_path, monkeypatch):
5557
def test_load_team_mapping_yaml_list_format(tmp_path, monkeypatch):
5658
"""Test load_team_mapping from teams.yaml with TeamName: [dev1, dev2]."""
5759
teams_file = tmp_path / "teams.yaml"
58-
teams_file.write_text("""
60+
teams_file.write_text(
61+
"""
5962
Platform: [alice, bob, charlie]
6063
Backend: [dave, eve]
61-
""")
64+
"""
65+
)
6266
monkeypatch.chdir(tmp_path)
6367
mapping = load_team_mapping(tmp_path)
6468
assert mapping == {
@@ -83,14 +87,16 @@ def test_load_team_mapping_teams_txt(tmp_path, monkeypatch):
8387
def test_load_team_mapping_teams_cfg_multiline(tmp_path, monkeypatch):
8488
"""Test load_team_mapping from teams.cfg with developers on separate lines."""
8589
teams_file = tmp_path / "teams.cfg"
86-
teams_file.write_text("""
90+
teams_file.write_text(
91+
"""
8792
[Platform]
8893
alice
8994
bob
9095
charlie
9196
[Backend]
9297
dave eve
93-
""")
98+
"""
99+
)
94100
monkeypatch.chdir(tmp_path)
95101
mapping = load_team_mapping(tmp_path)
96102
expected = {

0 commit comments

Comments
 (0)