File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,11 @@ def load_config(filename: str) -> Dict:
95
95
96
96
root = black .find_project_root ((filename ,))
97
97
98
- pyproject_filename = root / "pyproject.toml"
98
+ # Black 22.1.0+ returns a tuple
99
+ if isinstance (root , tuple ):
100
+ pyproject_filename = root [0 ] / "pyproject.toml"
101
+ else :
102
+ pyproject_filename = root / "pyproject.toml"
99
103
100
104
if not pyproject_filename .is_file ():
101
105
if GLOBAL_CONFIG is not None and GLOBAL_CONFIG .exists ():
Original file line number Diff line number Diff line change 1
1
[tool .black ]
2
- target-version = [' py27 ' ]
2
+ target-version = [' py39 ' ]
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ def test_load_config():
190
190
def test_load_config_target_version ():
191
191
config = load_config (str (fixtures_dir / "target_version" / "example.py" ))
192
192
193
- assert config ["target_version" ] == {black .TargetVersion .PY27 }
193
+ assert config ["target_version" ] == {black .TargetVersion .PY39 }
194
194
195
195
196
196
def test_load_config_py36 ():
You can’t perform that action at this time.
0 commit comments