python-frontmatter
python-frontmatter copied to clipboard
Allow pathlib in types
I did this:
from pathlib import Path
import frontmatter
markdown_file = Path("build") / "foo.md"
loaded = frontmatter.load(markdown_file)
What I got
Argument of type "Path" cannot be assigned to parameter "fd" of type "str | IOBase" in function
The code works, you just have to fix the types.
(title should say os.PathLike, not pathlib)