Skip to content

Allow pathlib in types #116

@verhovsky

Description

@verhovsky

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions