Enable Ruff PTH for the script directory (#124441)

* Enable Ruff PTH for the script directory

* Address review comments

* Fix translations script

* Update script/hassfest/config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Sid
2024-09-06 11:33:01 +02:00
committed by GitHub
parent 7752789c3a
commit 1db68327f9
18 changed files with 125 additions and 163 deletions

View File

@@ -66,7 +66,7 @@ class BucketHolder:
def create_ouput_file(self) -> None:
"""Create output file."""
with open("pytest_buckets.txt", "w") as file:
with Path("pytest_buckets.txt").open("w") as file:
for idx, bucket in enumerate(self._buckets):
print(f"Bucket {idx+1} has {bucket.total_tests} tests")
file.write(bucket.get_paths_line())