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 ...@@ -3,7 +3,6 @@ from typing_extensions import Annotated
from typing import Optional, List from typing import Optional, List
from pathlib import Path from pathlib import Path
from pydantic import BaseModel, ValidationError from pydantic import BaseModel, ValidationError
from pydantic_yaml import parse_yaml_raw_as, to_yaml_str
import frontmatter import frontmatter
from enum import Enum from enum import Enum
from rich.console import Console from rich.console import Console
...@@ -70,7 +69,7 @@ def lint( ...@@ -70,7 +69,7 @@ def lint(
# pprint(exc.errors(), expand_all=True) # pprint(exc.errors(), expand_all=True)
for err in exc.errors(): for err in exc.errors():
console.print( 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: else:
console.print("[green] Everything is alright") console.print("[green] Everything is alright")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment