chore: apply formatting

This commit is contained in:
Matthias
2025-11-27 06:45:06 +01:00
parent 33dbe32e5c
commit 6cef73947c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ def log_config_error_range(path: str, errmsg: str) -> str:
offsetlist = re.findall(r"(?<=Parse\serror\sat\soffset\s)\d+", errmsg) offsetlist = re.findall(r"(?<=Parse\serror\sat\soffset\s)\d+", errmsg)
if offsetlist: if offsetlist:
offset = int(offsetlist[0]) offset = int(offsetlist[0])
text = Path(path).read_text(encoding='utf-8') text = Path(path).read_text(encoding="utf-8")
# Fetch an offset of 80 characters around the error line # Fetch an offset of 80 characters around the error line
subtext = text[offset - min(80, offset) : offset + 80] subtext = text[offset - min(80, offset) : offset + 80]
segments = subtext.split("\n") segments = subtext.split("\n")
+1 -1
View File
@@ -148,7 +148,7 @@ class IResolver:
logger.debug("Ignoring broken symlink %s", entry) logger.debug("Ignoring broken symlink %s", entry)
continue continue
module_path = entry.resolve() module_path = entry.resolve()
if entry.read_text(encoding='utf-8').find(f"class {object_name}(") == -1: if entry.read_text(encoding="utf-8").find(f"class {object_name}(") == -1:
logger.debug(f"Skipping {module_path} as it does not contain class {object_name}.") logger.debug(f"Skipping {module_path} as it does not contain class {object_name}.")
continue continue