Skip to content
Snippets Groups Projects
Commit b285ef03 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Convert loc tuple element to str

parent 16641eb3
No related branches found
No related tags found
1 merge request!122Front matter linter
Pipeline #116663 canceled
......@@ -3,7 +3,6 @@ from typing_extensions import Annotated
from typing import Optional, List
from pathlib import Path
from pydantic import BaseModel, ValidationError
from pydantic_yaml import parse_yaml_raw_as, to_yaml_str
import frontmatter
from enum import Enum
from rich.console import Console
......@@ -70,7 +69,7 @@ def lint(
# pprint(exc.errors(), expand_all=True)
for err in exc.errors():
console.print(
f"[red]{err['msg']} : {err['type']} {' -> '.join(err['loc'])}"
f"[red]{err['msg']} : {err['type']} {' -> '.join([str(l) for l in err['loc']])}"
)
else:
console.print("[green] Everything is alright")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment