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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 125 additions and 163 deletions

View file

@ -2,7 +2,7 @@
"""Inspect all component SCHEMAS."""
import importlib
import os
from pathlib import Path
import pkgutil
from homeassistant.config import _identify_config_schema
@ -20,7 +20,7 @@ def explore_module(package):
def main():
"""Run the script."""
if not os.path.isfile("requirements_all.txt"):
if not Path("requirements_all.txt").is_file():
print("Run this from HA root dir")
return