Skip to content

Commit f536cb0

Browse files
committed
chore(ruff): Manual fixes for config_reader
src/tmuxp/config_reader.py:102:19: SIM115 Use context handler for opening files src/tmuxp/config_reader.py:102:19: PTH123 `open()` should be replaced by `Path.open()`
1 parent 2cb3d2b commit f536cb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tmuxp/config_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def _from_file(cls, path: pathlib.Path) -> t.Dict[str, t.Any]:
9999
{'session_name': 'my session'}
100100
"""
101101
assert isinstance(path, pathlib.Path)
102-
content = open(path).read()
102+
content = path.open().read()
103103

104104
if path.suffix in [".yaml", ".yml"]:
105105
format: "FormatLiteral" = "yaml"

0 commit comments

Comments
 (0)