From 3c7d6b7fc64cb5037d56434b847bf922a6b9861c Mon Sep 17 00:00:00 2001 From: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com> Date: Sun, 7 Dec 2025 00:49:23 +1100 Subject: [PATCH] [ci-custom] Fix after switch from string to path (#12314) --- script/ci-custom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/ci-custom.py b/script/ci-custom.py index 106aa438fe..609d89403f 100755 --- a/script/ci-custom.py +++ b/script/ci-custom.py @@ -554,10 +554,10 @@ def convert_path_to_relative(abspath, current): "esphome/components/web_server/__init__.py", ], ) -def lint_relative_py_import(fname, line, col, content): +def lint_relative_py_import(fname: Path, line, col, content): import_line = content.splitlines()[line] abspath = import_line[col:].split(" ")[0] - current = fname.removesuffix(".py").replace(os.path.sep, ".") + current = str(fname).removesuffix(".py").replace(os.path.sep, ".") replacement = convert_path_to_relative(abspath, current) newline = import_line.replace(abspath, replacement) return (