Fix-esphome-validation-line-number (#3815)

This commit is contained in:
Guillermo Ruffino authored and GitHub committed 2022-09-20 17:23:55 +12:00
1 parent b2db524366
commit 1444cddda9
3 files changed
+23 -9

No files matched your search

+3 -1
View File
@@ -12,7 +12,9 @@ from typing import Optional
def _get_invalid_range(res, invalid):
# type: (Config, cv.Invalid) -> Optional[DocumentRange]
return res.get_deepest_document_range_for_path(invalid.path)
return res.get_deepest_document_range_for_path(
invalid.path, invalid.error_message == "extra keys not allowed"
)
def _dump_range(range):